Windows NT 4.0 source code leak
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.

45 lines
1020 B

4 years ago
  1. #include <sysinc.h>
  2. #include <string.h>
  3. #include <rpc.h>
  4. #include <util.hxx>
  5. #ifdef DEBUGRPC
  6. typedef struct _RPC_MEMORY_BLOCK
  7. {
  8. // Guards the very beginning of the memory block. We validate this
  9. // before messing with the rest of the block.
  10. unsigned char blockguard[4];
  11. // Specifies the size of the block of memory in bytes.
  12. unsigned long size;
  13. // The next block in the chain of allocated blocks.
  14. struct _RPC_MEMORY_BLOCK * next;
  15. // The previous block in the chain of allocated blocks; this makes
  16. // deletion of a block simpler.
  17. struct _RPC_MEMORY_BLOCK * previous;
  18. // Pad so that the end of the frontguard (and hence the beginning of
  19. // the block passed to the user) is on a 0 mod 8 boundary.
  20. unsigned long pad;
  21. // Reserve an extra 4 bytes as the front guard of each block.
  22. unsigned char frontguard[4];
  23. // Reserve an extra 4 bytes as the rear guard of each block.
  24. unsigned char rearguard[4];
  25. } RPC_MEMORY_BLOCK;
  26. #endif // DEBUGRPC