Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

  1. #ifndef __memalloc_simple_h_
  2. #define __memalloc_simple_h_
  3. /*
  4. ** Copyright 1994, Silicon Graphics, Inc.
  5. ** All Rights Reserved.
  6. **
  7. ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  8. ** the contents of this file may not be disclosed to third parties, copied or
  9. ** duplicated in any form, in whole or in part, without the prior written
  10. ** permission of Silicon Graphics, Inc.
  11. **
  12. ** RESTRICTED RIGHTS LEGEND:
  13. ** Use, duplication or disclosure by the Government is subject to restrictions
  14. ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  15. ** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  16. ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  17. ** rights reserved under the Copyright Laws of the United States.
  18. **
  19. ** Author: Eric Veach, July 1994.
  20. */
  21. #ifdef NT
  22. //#include "winmem.h"
  23. #else
  24. #include "malloc.h"
  25. #endif
  26. #include <windows.h>
  27. // MF memory defines
  28. #define memAlloc(size) mfmemAlloc(size)
  29. #if 0
  30. //mf: calloc not appear to be used
  31. #define calloc(nobj, size) LocalAlloc(LMEM_FIXED|LMEM_ZEROINIT, (UINT)((nobj) * (size)))
  32. #endif
  33. #define memRealloc(p, size) mfmemRealloc(p, size)
  34. #define memFree(p) mfmemFree(p)
  35. #define memInit(size) mfmemInit(size)
  36. // MF memory function externs
  37. extern void mfmemInit( size_t maxFast );
  38. extern void *mfmemAlloc( size_t size );
  39. extern void *mfmemRealloc( void *p, size_t size );
  40. extern void mfmemFree( void *p );
  41. #endif