diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2015-02-28 01:26:21 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-03-01 16:55:08 -0600 |
commit | f2dd720826afaa6669feb9baed6196c960383899 (patch) | |
tree | 34d85a15a755ee7e685c911b2762f3c393e187d7 /src/include/kernel | |
parent | db9b6fed621390d10459834300924e0fafd6fa04 (diff) | |
download | talos-hostboot-f2dd720826afaa6669feb9baed6196c960383899.tar.gz talos-hostboot-f2dd720826afaa6669feb9baed6196c960383899.zip |
Reduce memory fragementation in large allocations
- Free excess allocation pages in reverse order
Change-Id: I4c5f2909275e2d3dc71b0806fbf177a101b47292
CQ: FW633822
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16066
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/kernel')
-rw-r--r-- | src/include/kernel/pagemgr.H | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/include/kernel/pagemgr.H b/src/include/kernel/pagemgr.H index dcd14c456..95bb2fb65 100644 --- a/src/include/kernel/pagemgr.H +++ b/src/include/kernel/pagemgr.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2010,2014 */ +/* Contributors Listed Below - COPYRIGHT 2010,2015 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -81,8 +83,13 @@ class PageManagerCore * Return page allocations to the page manager * @param[in] i_page, pointer to the allocation * @param[in] i_pageCount, the number of pages in the allocation + * @param[in] i_overAllocated, whether pages to free are the being + * returned because the intial allocation was larger than needed */ - void freePage( void * i_page, size_t i_pageCount ); + void freePage( + void* i_page, + size_t i_pageCount, + bool i_overAllocated = false ); /** * Coalesce pages in the page manager (defrag) |