Memory.cpp 493 B

123456789101112131415161718192021222324252627282930
  1. #include "il2cpp-config.h"
  2. #include "os/Memory.h"
  3. #if IL2CPP_TARGET_WINDOWS
  4. namespace il2cpp
  5. {
  6. namespace os
  7. {
  8. namespace Memory
  9. {
  10. void* AlignedAlloc(size_t size, size_t alignment)
  11. {
  12. return _aligned_malloc(size, alignment);
  13. }
  14. void* AlignedReAlloc(void* memory, size_t newSize, size_t alignment)
  15. {
  16. return _aligned_realloc(memory, newSize, alignment);
  17. }
  18. void AlignedFree(void* memory)
  19. {
  20. return _aligned_free(memory);
  21. }
  22. }
  23. }
  24. }
  25. #endif