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:
Ingo Weinhold 2008-10-08 14:05:47 +00:00
parent 79097ca072
commit 7867cf37df

View File

@ -54,6 +54,9 @@ struct free_chunk {
static const size_t kInitialHeapSize = 50 * B_PAGE_SIZE;
// 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 hoardLockType sHeapLock;
static void *sHeapBase;
@ -194,7 +197,8 @@ hoardSbrk(long size)
sFreeHeapSize += 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) {
SERIAL_PRINT(("HEAP-%ld: heap area large enough for %ld\n", find_thread(NULL), size));