| Line |   | 
|---|
| 1 | /*
 | 
|---|
| 2 |  * Shared heap functions for OS/2
 | 
|---|
| 3 |  *
 | 
|---|
| 4 |  * Copyright 1999 Sander van Leeuwen (sandervl@xs4all.nl)
 | 
|---|
| 5 |  *
 | 
|---|
| 6 |  */
 | 
|---|
| 7 | #ifndef __HEAPSHARED_H__
 | 
|---|
| 8 | #define __HEAPSHARED_H__
 | 
|---|
| 9 | 
 | 
|---|
| 10 | #include <stddef.h>
 | 
|---|
| 11 | #include <stdlib.h>
 | 
|---|
| 12 | #include <umalloc.h>
 | 
|---|
| 13 | 
 | 
|---|
| 14 | #define PAGE_SIZE               4096
 | 
|---|
| 15 | 
 | 
|---|
| 16 | BOOL   SYSTEM InitializeSharedHeap();
 | 
|---|
| 17 | void   SYSTEM DestroySharedHeap();
 | 
|---|
| 18 | 
 | 
|---|
| 19 | #ifdef DEBUG
 | 
|---|
| 20 |     void * _System _debug_smalloc(int size, char *pszFile, int linenr);
 | 
|---|
| 21 |     void * _System _debug_smallocfill(int size, int filler, char *pszFile, int linenr);
 | 
|---|
| 22 |     void   _System _debug_sfree(void *chunk, char *pszFile, int linenr);
 | 
|---|
| 23 | 
 | 
|---|
| 24 |     #define _smalloc(a)         _debug_smalloc((a),__FILE__,__LINE__)
 | 
|---|
| 25 |     #define _smallocfill(a,b)   _debug_smallocfill((a),(b),__FILE__,__LINE__)
 | 
|---|
| 26 |     #define _sfree(a)           _debug_sfree((a),__FILE__,__LINE__)
 | 
|---|
| 27 | #else
 | 
|---|
| 28 |     void * _System _smalloc(int size);
 | 
|---|
| 29 |     void * _System _smallocfill(int size, int filler);
 | 
|---|
| 30 |     #define _sfree(a) free(a)
 | 
|---|
| 31 | #endif
 | 
|---|
| 32 | 
 | 
|---|
| 33 | #endif
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.