summaryrefslogtreecommitdiffstats
path: root/src/kernel/heapmgr.C
Commit message (Collapse)AuthorAgeFilesLines
* Race condition in heap coalesce.Patrick Williams2013-05-151-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the heap coalesce function looked at the "free" flag on the next block to determine if two blocks could be merged together. The coalesce function is ran with all cores synchronized so no one should be modifying the heap, but there is still a subtle race condition. A user task could be in the process of freeing a block, marking it "free" but not actually inserting it onto the queues yet. The coalesce will combine this block together but then when the user task resumes it continues to try to insert it onto the queue. This causes both the larger merged block and the smaller block to be on a free queue and memory corruption when both blocks are used. This is resolved by having a new flag indicating that the block is known to be part of the "coalesce" group and using this in addition to the "free" flag. Only blocks which are actually present on the free queues are considered to be part of the "coalesce" group. Change-Id: If33d15d731d32e07e01104244ebc65daf2295878 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4520 Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Enhance heap corruption detection.Patrick Williams2013-05-011-3/+5
| | | | | | | | Change-Id: I25ec156fe3c9088d2de2254017407dbadd2fac31 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4255 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Improve HeapManager::coalesce.Patrick Williams2013-01-191-76/+119
| | | | | | | | | | | | | | | | | | | The coalesce was causing time issues in VPO. Reduce from an O(n^2) to O(n) algorithm. Results from one particular execution: - Old - 91649004 cycles for 7471 chunks - New - 02668146 cycles for 7676 chunks <3% cycle time of original algorithm. Change-Id: I7145c6b430dccdb3f08d186a1ee5ea2f86aa3f81 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2942 Tested-by: Jenkins Server Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
* Tool to display memory statisticsDoug Gilbert2012-01-121-28/+27
| | | | | | | Change-Id: Iaac392b9f4287ba888e454532c4061d6a14c6e5c Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/593 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* BEAM warning fixes.Patrick Williams2011-10-271-9/+9
| | | | | | | | Change-Id: Iada5e8b69c7919d2b59febd861450abeb7c45287 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/451 Tested-by: Jenkins Server Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* new HEAP manager to reduce fragmentationDoug Gilbert2011-10-251-35/+459
| | | | | | | | Change-Id: Ibe725a43e6366d9113ec99df1cc6aafa7bbb770e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/431 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
* Centralizing a few of the memory-related constants to avoid someDan Crowell2011-09-141-1/+1
| | | | | | | | | | | | redundancies and also to have a single place to update the memory map if needed. See Task 3507. Change-Id: I8f2d632983abe6d6798784e975cd93057018594b Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/330 Tested-by: Jenkins Server Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
* Add copyright headers to all source files.Patrick Williams2011-08-241-0/+22
| | | | | | | Change-Id: I205f2409e56032cfc0aaf01d7e26d357f0b86373 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/277 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
* VMM Improvements.Patrick Williams2011-07-201-1/+2
| | | | | | | | | | | - Segment Manager - Base / Device Segments - Block for Base image. Change-Id: Ic0c058e5c5b210ec1c48d30f6ed9f9837d74a3c8 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/193 Tested-by: Jenkins Server Reviewed-by: MATTHEW S. BARTH <msbarth@us.ibm.com>
* Enable -Wall and fix warnings.Patrick Williams2010-08-191-2/+2
|
* malloc / free supportPatrick Williams2010-05-211-1/+6
|
* Add heap manager for allocations up to 2040 bytesPatrick Williams2010-05-211-0/+83
OpenPOWER on IntegriCloud