3DEngineMemory.cpp 978 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. * its licensors.
  4. *
  5. * For complete copyright and license terms please see the LICENSE at the root of this
  6. * distribution (the "License"). All use of this software is governed by the License,
  7. * or, if provided, by the license below or the license accompanying this file. Do not
  8. * remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. *
  11. */
  12. // Original file Copyright Crytek GMBH or its affiliates, used under license.
  13. #include "Cry3DEngine_precompiled.h"
  14. #include "3DEngineMemory.h"
  15. // Static CTemporaryPool instance
  16. CTemporaryPool* CTemporaryPool::s_Instance = NULL;
  17. namespace util
  18. {
  19. void* pool_allocate(size_t nSize)
  20. {
  21. return CTemporaryPool::Get()->Allocate(nSize, 8);
  22. }
  23. void pool_free(void* ptr)
  24. {
  25. return CTemporaryPool::Get()->Free(ptr);
  26. }
  27. }