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.

29 lines
810 B

  1. /*************************************************
  2. * mem.h *
  3. * *
  4. * Copyright (C) 1995-1999 Microsoft Inc. *
  5. * *
  6. *************************************************/
  7. // mem.h
  8. //
  9. // Win32s works better if you use GlobalAlloc for large memory
  10. // blocks so the CWave and CDIB classes use the ALLOC and FREE
  11. // macros defined here so you can optionally use either
  12. // malloc (for pure 32 bit platforms) or GlobalAlloc if you
  13. // want the app to run on Win32s
  14. #define USE_GLOBALALLOC 1
  15. #ifdef USE_GLOBALALLOC
  16. #define ALLOC(s) GlobalAlloc(GPTR, s)
  17. #define FREE(p) GlobalFree(p)
  18. #else
  19. #define ALLOC(s) malloc(s)
  20. #define FREE(p) free(p)
  21. #endif