view vmalloc.h @ 62:dd3e60aeae26

Middle of fixing for -O3.. works -O0 still -- hard-code field offsets in assbly
author Me
date Fri, 12 Nov 2010 07:36:01 -0800
parents 8f7141a9272e
children 13b22ffb8a2f
line source
1 /*
2 * Copyright 2009 OpenSourceCodeStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 * Created on November 14, 2009, 9:07 PM
8 */
10 #include <malloc.h>
11 #include "VMS_primitive_data_types.h"
13 typedef struct _MallocProlog MallocProlog;
15 struct _MallocProlog
16 {
17 MallocProlog *nextChunkInFreeList;
18 MallocProlog *prevChunkInFreeList;
19 MallocProlog *nextHigherInMem;
20 MallocProlog *nextLowerInMem;
21 };
22 //MallocProlog
24 typedef struct
25 {
26 MallocProlog *firstChunkInFreeList;
27 int32 numInList;
28 }
29 FreeListHead;
31 void *
32 VMS__malloc( int32 sizeRequested );
34 void
35 VMS__free( void *ptrToFree );
37 /*Allocates memory from the external system -- higher overhead
38 */
39 void *
40 VMS__malloc_in_ext( int32 sizeRequested );
42 /*Frees memory that was allocated in the external system -- higher overhead
43 */
44 void
45 VMS__free_in_ext( void *ptrToFree );
48 MallocProlog *
49 VMS_ext__create_free_list();
51 void
52 VMS_ext__free_free_list( MallocProlog *freeListHead );