annotate vmalloc.h @ 146:a49f02980151

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