Increase the heap size in 64 KB steps. Was 4 KB before, which was a bit
slow for short-running, heap-intensive programs. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27925 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,6 +54,9 @@ struct free_chunk {
|
|||||||
static const size_t kInitialHeapSize = 50 * B_PAGE_SIZE;
|
static const size_t kInitialHeapSize = 50 * B_PAGE_SIZE;
|
||||||
// that's about what hoard allocates anyway
|
// that's about what hoard allocates anyway
|
||||||
|
|
||||||
|
static const size_t kHeapIncrement = 16 * B_PAGE_SIZE;
|
||||||
|
// the steps in which to increase the heap size
|
||||||
|
|
||||||
static area_id sHeapArea;
|
static area_id sHeapArea;
|
||||||
static hoardLockType sHeapLock;
|
static hoardLockType sHeapLock;
|
||||||
static void *sHeapBase;
|
static void *sHeapBase;
|
||||||
@@ -194,7 +197,8 @@ hoardSbrk(long size)
|
|||||||
sFreeHeapSize += size;
|
sFreeHeapSize += size;
|
||||||
|
|
||||||
// round to next page size
|
// round to next page size
|
||||||
size_t pageSize = (sFreeHeapSize + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1);
|
size_t pageSize = (sFreeHeapSize + kHeapIncrement - 1)
|
||||||
|
& ~(kHeapIncrement - 1);
|
||||||
|
|
||||||
if (pageSize < sHeapAreaSize) {
|
if (pageSize < sHeapAreaSize) {
|
||||||
SERIAL_PRINT(("HEAP-%ld: heap area large enough for %ld\n", find_thread(NULL), size));
|
SERIAL_PRINT(("HEAP-%ld: heap area large enough for %ld\n", find_thread(NULL), size));
|
||||||
|
|||||||
Reference in New Issue
Block a user