JSMemoryStatsSCE.h 852 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright (C) 2013 Sony Computer Entertainment Inc.
  2. // All Rights Reserved.
  3. #ifndef JSMemoryStatsSCE_h
  4. #define JSMemoryStatsSCE_h
  5. #include <JavaScriptCore/JSContextRef.h>
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. #define JS_MEMORY_STATS_SCE_FLAG_GC (1<<0)
  10. #define JS_MEMORY_STATS_SCE_FLAG_EXECALLOC (1<<1)
  11. #define JS_MEMORY_STATS_SCE_FLAG_ALL ((1<<2) - 1)
  12. struct JSMemoryStatsSCE {
  13. size_t flags;
  14. struct {
  15. size_t size;
  16. size_t capacity;
  17. size_t objectCount;
  18. } gcHeap;
  19. struct {
  20. size_t committed;
  21. } executableAllocator;
  22. };
  23. /*!
  24. @function JSMemorystatsQuerySCE
  25. @abstract Retrieve memory stats about a JS context
  26. */
  27. JS_EXPORT void JSMemoryStatsQuerySCE(JSContextRef, JSMemoryStatsSCE &);
  28. #ifdef __cplusplus
  29. }
  30. #endif
  31. #endif /* JSMemoryStatsSCE_h */