Team Fortress 2 Source Code as on 22/4/2020
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.

47 lines
754 B

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