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.

46 lines
1.3 KiB

  1. inline
  2. PVOID __cdecl
  3. operator new(
  4. size_t size,
  5. PVOID pPlacement
  6. )
  7. {
  8. return pPlacement;
  9. }
  10. typedef struct tagOpenedDbgSection
  11. {
  12. HANDLE SectionHandle;
  13. CellSection *SectionPointer;
  14. DWORD SectionNumbers[2]; // the section numbers for this section
  15. int CommittedPagesInSection;
  16. int SectionID;
  17. CellSection *SectionCopy;
  18. LIST_ENTRY SectionsList;
  19. } OpenedDbgSection;
  20. typedef struct tagSectionsSnapshot
  21. {
  22. OpenedDbgSection *FirstOpenedSection; // the start of the list
  23. OpenedDbgSection *CurrentOpenedSection; // the currently enumerated section
  24. int CellIndex; // the cell index within the currently enumerated section
  25. } SectionsSnapshot;
  26. inline DebugCellGeneric *GetLastCellForSection(IN OpenedDbgSection *Section, IN DWORD LocalPageSize)
  27. {
  28. ASSERT(Section != NULL);
  29. ASSERT(Section->SectionCopy != NULL);
  30. return (DebugCellGeneric *)((unsigned char *) Section->SectionCopy +
  31. Section->CommittedPagesInSection * LocalPageSize - sizeof(DebugFreeCell));
  32. }
  33. inline DebugCellGeneric *GetCellForSection(IN OpenedDbgSection *Section, IN DWORD CellIndex)
  34. {
  35. ASSERT(Section != NULL);
  36. ASSERT(Section->SectionCopy != NULL);
  37. return (DebugCellGeneric *)((unsigned char *) Section->SectionCopy
  38. + CellIndex * sizeof(DebugFreeCell));
  39. }