Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff vmalloc.c @ 79:97e26095c01f
Version 0
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 11 Jul 2011 18:09:43 +0200 |
| parents | 521c75d64cef |
| children | a214c84dff4e |
line diff
1.1 --- a/vmalloc.c Mon Jul 04 19:45:43 2011 +0200 1.2 +++ b/vmalloc.c Mon Jul 11 18:09:43 2011 +0200 1.3 @@ -450,6 +450,14 @@ 1.4 freeListHead = malloc( sizeof(MallocProlog) ); 1.5 firstChunk = malloc( MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE ); 1.6 if( firstChunk == NULL ) {printf("malloc error\n"); exit(1);} 1.7 + 1.8 + //Touch memory to avoid page faults 1.9 + //void *ptr,*endPtr; 1.10 + //endPtr = (void*)firstChunk+MALLOC_ADDITIONAL_MEM_FROM_OS_SIZE; 1.11 + //for(ptr = firstChunk; ptr < endPtr; ptr+=PAGE_SIZE) 1.12 + //{ 1.13 + // *(char*)ptr = 0; 1.14 + //} 1.15 1.16 freeListHead->prevChunkInFreeList = NULL; 1.17 //Use this addr to free the heap when cleanup
