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. /* as_conf.cpp */
  3. /* */
  4. /* Routines for RDP per-conference class */
  5. /* */
  6. /* COPYRIGHT(C) Microsoft 1996-1999 */
  7. /****************************************************************************/
  8. /****************************************************************************/
  9. /* There is no tracing in this file. However, TRC_FILE is included for */
  10. /* completeness, pTRCWd is required by checked versions of COM_Malloc/Free */
  11. /****************************************************************************/
  12. #define TRC_FILE "as_conf"
  13. #define pTRCWd NULL
  14. /****************************************************************************/
  15. /* Header that sets up OS flags. Include before everything else */
  16. /* Also pulls in class forward references etc. */
  17. /****************************************************************************/
  18. #include <precomp.h>
  19. #pragma hdrstop
  20. #include <adcg.h>
  21. #ifdef OS_WINDOWS
  22. #include <mmsystem.h>
  23. #endif /* OS_WINDOWS */
  24. #include <as_conf.hpp>
  25. /****************************************************************************/
  26. /* Override new and delete */
  27. /****************************************************************************/
  28. void * __cdecl operator new(size_t nSize)
  29. {
  30. PVOID ptr;
  31. if ((sizeof(nSize)) >= PAGE_SIZE) {
  32. KdPrint(("RDPWD: **** Note ShareClass allocation size %u is above "
  33. "page size %u, wasting %u\n", sizeof(ShareClass), PAGE_SIZE,
  34. PAGE_SIZE - (nSize % PAGE_SIZE)));
  35. }
  36. ptr = COM_Malloc(nSize);
  37. if (ptr != NULL) {
  38. KdPrint(("RDPWD: New: ShareClass at %p, size=%u\n", ptr, nSize));
  39. }
  40. return ptr;
  41. }
  42. void __cdecl operator delete(void* p)
  43. {
  44. KdPrint(("RDPWD: Delete: Free memory at %p\n", p));
  45. COM_Free(p);
  46. }
  47. /****************************************************************************/
  48. /* Now get the const data arrays initialised. */
  49. /****************************************************************************/
  50. #define DC_CONSTANT_DATA
  51. #include <adata.c>
  52.