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.

52 lines
864 B

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. // mem.c
  9. #include <stdlib.h>
  10. #ifndef _PS3
  11. #include <memory.h>
  12. #endif
  13. #include <string.h>
  14. #include "mem.h"
  15. // NOTE: This has to be the last file included!
  16. #include "tier0/memdbgon.h"
  17. void *Mem_Malloc( size_t size )
  18. {
  19. return malloc( size );
  20. }
  21. void *Mem_ZeroMalloc( size_t size )
  22. {
  23. void *p;
  24. p = malloc( size );
  25. memset( (unsigned char *)p, 0, size );
  26. return p;
  27. }
  28. void *Mem_Realloc( void *memblock, size_t size )
  29. {
  30. return realloc( memblock, size );
  31. }
  32. void *Mem_Calloc( int num, size_t size )
  33. {
  34. return calloc( num, size );
  35. }
  36. char *Mem_Strdup( const char *strSource )
  37. {
  38. return strdup( strSource );
  39. }
  40. void Mem_Free( void *p )
  41. {
  42. free( p );
  43. }