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.

65 lines
2.5 KiB

  1. /************************************************************/
  2. /* Windows Write, Copyright 1985-1992 Microsoft Corporation */
  3. /************************************************************/
  4. #ifdef OURHEAP
  5. /*
  6. heapData.h - include file for the share data of the heap modules.
  7. */
  8. extern HH *phhMac;
  9. extern int *pHeapFirst;
  10. extern FGR *rgfgr;
  11. extern FGR *pfgrMac;
  12. extern FGR *pfgrFree;
  13. extern HH *phhFree;
  14. extern int *pmemMax;
  15. #ifdef DEBUG
  16. extern int fStoreCheck, fNoShake;
  17. #endif
  18. /* CONSTANTS */
  19. #define bhh (-1) /* finds hunk given hh */
  20. #define cfgrBlock 10
  21. #define ifgrInit 60 /* defines the initial number of finger
  22. pointers. */
  23. #define cwHunkMin cwof(HH) /* minimum number of words in a hunk */
  24. /* including the header (1 word) */
  25. #define cwReqMin (cwHunkMin - 1) /* how small a request can be */
  26. extern int cwHeapMac;
  27. extern unsigned cbTot, cbTotQuotient, cwHeapFree;
  28. #endif /* OURHEAP */
  29. extern int *memory;
  30. #define cwSaveAlloc (128) /* A buffer (vhrgbSave) of this size is */
  31. /* allocated off of */
  32. /* the heap in init. It is freed during */
  33. /* the save operation so we have enough */
  34. /* heap space to complete the save */
  35. /* operation. After the save is complete, */
  36. /* we try to reclaim this space so the next */
  37. /* save operation will have a fighting */
  38. /* chance to complete. */
  39. #define cwHeapMinPerWindow 50 /* We expand the vhrgbSave buffer by this */
  40. /* amount every time we open a new window. */
  41. /* The theory is that for every additional */
  42. /* window, we can conceivable require an */
  43. /* additional save operation which may eat */
  44. /* up space. A save operation may require */
  45. /* space for an fcb and new run table. */
  46. /* On the other hand, the save operation */
  47. /* reduces the size of the piece table and*/
  48. /* thus frees some space. Whether this will*/
  49. /* free enough space for the save operation */
  50. /* is impossible to tell at the time we */
  51. /* open the window.*/
  52. #define cwHeapSpaceMin (60) /* once heap space is below this amount,
  53. the main loop will disable all menu
  54. commands except save, saveas, and quit. */
  55. #define ibpMaxSmall (30) /* pages in rgbp if we were in a tight memory environment */
  56. #define ibpMaxBig (60) /* pages in rgbp if we were in a bigger memory environment */
  57.