diff vmalloc.h @ 50:8f7141a9272e

Added VMS__malloc and probes, and major re-factoring to separate mallocs
author Me
date Sat, 30 Oct 2010 20:54:36 -0700
parents
children 42dd44df1bb0
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/vmalloc.h	Sat Oct 30 20:54:36 2010 -0700
     1.3 @@ -0,0 +1,41 @@
     1.4 +/*
     1.5 + *  Copyright 2009 OpenSourceCodeStewardshipFoundation.org
     1.6 + *  Licensed under GNU General Public License version 2
     1.7 + *
     1.8 + * Author: seanhalle@yahoo.com
     1.9 + *
    1.10 + * Created on November 14, 2009, 9:07 PM
    1.11 + */
    1.12 +
    1.13 +#include <malloc.h>
    1.14 +#include "VMS_primitive_data_types.h"
    1.15 +
    1.16 +typedef struct _MallocProlog MallocProlog;
    1.17 +
    1.18 +struct _MallocProlog
    1.19 + {
    1.20 +   MallocProlog *nextChunkInFreeList;
    1.21 +   MallocProlog *prevChunkInFreeList;
    1.22 +   MallocProlog *nextHigherInMem;
    1.23 +   MallocProlog *nextLowerInMem;
    1.24 + };
    1.25 +//MallocProlog
    1.26 +
    1.27 +typedef struct
    1.28 + {
    1.29 +   MallocProlog *firstChunkInFreeList;
    1.30 +   int32         numInList;
    1.31 + }
    1.32 +FreeListHead;
    1.33 +
    1.34 +void *
    1.35 +VMS__malloc( int32 sizeRequested );
    1.36 +
    1.37 +void
    1.38 +VMS__free( void *ptrToFree );
    1.39 +
    1.40 +MallocProlog *
    1.41 +VMS__create_free_list();
    1.42 +
    1.43 +void
    1.44 +VMS_ext__free_free_list( MallocProlog *freeListHead );