Counter Strike : Global Offensive Source Code
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.

38 lines
697 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #if !defined(_STATIC_LINKED) || defined(_SHARED_LIB)
  9. #ifndef _PS3
  10. #include <malloc.h>
  11. #endif
  12. #include "vallocator.h"
  13. #include "basetypes.h"
  14. // memdbgon must be the last include file in a .cpp file!!!
  15. #include "tier0/memdbgon.h"
  16. VStdAllocator g_StdAllocator;
  17. void* VStdAllocator::Alloc(unsigned long size)
  18. {
  19. if(size)
  20. {
  21. void *ret = malloc(size);
  22. return ret;
  23. }
  24. else
  25. return 0;
  26. }
  27. void VStdAllocator::Free(void *ptr)
  28. {
  29. free(ptr);
  30. }
  31. #endif // !_STATIC_LINKED || _SHARED_LIB