Leaked source code of windows server 2003
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.

39 lines
1015 B

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corporation, 1997 - 2002 **/
  4. /**********************************************************************/
  5. #ifndef __UTIL
  6. #define __UTIL
  7. //#include <windows.h>
  8. #define ROUNDUP2( x, n ) ((((ULONG)(x)) + (((ULONG)(n)) - 1 )) & ~(((ULONG)(n)) - 1 ))
  9. #define MINIMUM_VM_ALLOCATION 0x10000
  10. #define SUBALLOCATOR_ALIGNMENT 8
  11. #define StrToInt TextToUnsignedNum
  12. struct _SUBALLOCATOR
  13. {
  14. PVOID VirtualListTerminator;
  15. PVOID *VirtualList;
  16. PCHAR NextAvailable;
  17. PCHAR LastAvailable;
  18. ULONG GrowSize;
  19. };
  20. typedef struct _SUBALLOCATOR SUBALLOCATOR, *PSUBALLOCATOR;
  21. PVOID __fastcall SubAllocate(IN HANDLE hAllocator, IN ULONG Size);
  22. VOID DestroySubAllocator(IN HANDLE hAllocator);
  23. HANDLE CreateSubAllocator(IN ULONG InitialCommitSize, IN ULONG GrowthCommitSize);
  24. #endif