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
1.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Memory allocation!
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TIER0_MEM_H
  8. #define TIER0_MEM_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include <stddef.h>
  13. #include "tier0/platform.h"
  14. #if !defined(STATIC_TIER0) && !defined(_STATIC_LINKED)
  15. #ifdef TIER0_DLL_EXPORT
  16. # define MEM_INTERFACE DLL_EXPORT
  17. #else
  18. # define MEM_INTERFACE DLL_IMPORT
  19. #endif
  20. #else // BUILD_AS_DLL
  21. #define MEM_INTERFACE extern
  22. #endif // BUILD_AS_DLL
  23. //-----------------------------------------------------------------------------
  24. // DLL-exported methods for particular kinds of memory
  25. //-----------------------------------------------------------------------------
  26. MEM_INTERFACE void *MemAllocScratch( int nMemSize );
  27. MEM_INTERFACE void MemFreeScratch();
  28. MEM_INTERFACE void MemAllocOOMError( size_t nSize );
  29. #ifdef _LINUX
  30. MEM_INTERFACE void ZeroMemory( void *mem, size_t length );
  31. #endif
  32. #endif /* TIER0_MEM_H */