annotate vmalloc.h @ 156:b86c54dfb19f

smaller Hists for malloc, free and plugin
author Merten Sach <msach@mailbox.tu-berlin.de>
date Thu, 06 Oct 2011 15:55:42 +0200
parents 521c75d64cef a49f02980151
children c1784868dcea
rev   line source
Me@65 1 /*
Me@65 2 * Copyright 2009 OpenSourceCodeStewardshipFoundation.org
Me@65 3 * Licensed under GNU General Public License version 2
Me@65 4 *
Me@65 5 * Author: seanhalle@yahoo.com
Me@65 6 *
Me@65 7 * Created on November 14, 2009, 9:07 PM
Me@65 8 */
Me@65 9
Me@65 10 #ifndef _VMALLOC_H
Me@65 11 #define _VMALLOC_H
Me@65 12
Me@65 13 #include <malloc.h>
msach@76 14 #include <inttypes.h>
Me@65 15 #include "VMS_primitive_data_types.h"
Me@65 16
Me@65 17 typedef struct _MallocProlog MallocProlog;
Me@65 18
Me@65 19 struct _MallocProlog
Me@65 20 {
Me@65 21 MallocProlog *nextChunkInFreeList;
Me@65 22 MallocProlog *prevChunkInFreeList;
Me@65 23 MallocProlog *nextHigherInMem;
Me@65 24 MallocProlog *nextLowerInMem;
Me@65 25 };
Me@65 26 //MallocProlog
Me@65 27
Me@65 28 typedef struct
Me@65 29 {
Me@65 30 MallocProlog *firstChunkInFreeList;
msach@76 31 int32 numInList; //TODO not used
Me@65 32 }
Me@65 33 FreeListHead;
Me@65 34
Me@65 35 void *
msach@76 36 VMS__malloc( size_t sizeRequested );
Me@65 37
msach@78 38 void *
msach@78 39 VMS__malloc_aligned( size_t sizeRequested );
msach@78 40
Me@65 41 void
Me@65 42 VMS__free( void *ptrToFree );
Me@65 43
Me@65 44 /*Allocates memory from the external system -- higher overhead
Me@65 45 */
Me@65 46 void *
msach@76 47 VMS__malloc_in_ext( size_t sizeRequested );
Me@65 48
Me@65 49 /*Frees memory that was allocated in the external system -- higher overhead
Me@65 50 */
Me@65 51 void
Me@65 52 VMS__free_in_ext( void *ptrToFree );
Me@65 53
Me@65 54
Me@65 55 MallocProlog *
Me@65 56 VMS_ext__create_free_list();
Me@65 57
Me@65 58 void
Me@65 59 VMS_ext__free_free_list( MallocProlog *freeListHead );
Me@65 60
Me@65 61 #endif