aboutsummaryrefslogtreecommitdiff
path: root/src/lj_obj.h
diff options
context:
space:
mode:
authorMike Pall <mike>2014-12-20 00:17:50 +0100
committerMike Pall <mike>2014-12-20 00:17:50 +0100
commit6e9145a882ea70fe438d59959ac4e65481fe5e85 (patch)
tree98e7c78e5aab6bd0360d9e00e4c82e9f1634c96d /src/lj_obj.h
parent82e6e5fb5f17e497b3341322998ede75ec29e554 (diff)
downloadluajit-6e9145a882ea70fe438d59959ac4e65481fe5e85.tar.gz
luajit-6e9145a882ea70fe438d59959ac4e65481fe5e85.tar.bz2
luajit-6e9145a882ea70fe438d59959ac4e65481fe5e85.zip
Cleanup of memory vs. GC sizes. No functional changes.
Diffstat (limited to 'src/lj_obj.h')
-rw-r--r--src/lj_obj.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lj_obj.h b/src/lj_obj.h
index daa62e34..99e2d819 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -15,8 +15,9 @@
15 15
16/* -- Memory references (32 bit address space) ---------------------------- */ 16/* -- Memory references (32 bit address space) ---------------------------- */
17 17
18/* Memory size. */ 18/* Memory and GC object sizes. */
19typedef uint32_t MSize; 19typedef uint32_t MSize;
20typedef uint32_t GCSize;
20 21
21/* Memory reference */ 22/* Memory reference */
22typedef struct MRef { 23typedef struct MRef {
@@ -490,8 +491,8 @@ typedef enum {
490#define mmname_str(g, mm) (strref((g)->gcroot[GCROOT_MMNAME+(mm)])) 491#define mmname_str(g, mm) (strref((g)->gcroot[GCROOT_MMNAME+(mm)]))
491 492
492typedef struct GCState { 493typedef struct GCState {
493 MSize total; /* Memory currently allocated. */ 494 GCSize total; /* Memory currently allocated. */
494 MSize threshold; /* Memory threshold. */ 495 GCSize threshold; /* Memory threshold. */
495 uint8_t currentwhite; /* Current white color. */ 496 uint8_t currentwhite; /* Current white color. */
496 uint8_t state; /* GC state. */ 497 uint8_t state; /* GC state. */
497 uint8_t nocdatafin; /* No cdata finalizer called. */ 498 uint8_t nocdatafin; /* No cdata finalizer called. */
@@ -503,9 +504,9 @@ typedef struct GCState {
503 GCRef grayagain; /* List of objects for atomic traversal. */ 504 GCRef grayagain; /* List of objects for atomic traversal. */
504 GCRef weak; /* List of weak tables (to be cleared). */ 505 GCRef weak; /* List of weak tables (to be cleared). */
505 GCRef mmudata; /* List of userdata (to be finalized). */ 506 GCRef mmudata; /* List of userdata (to be finalized). */
507 GCSize debt; /* Debt (how much GC is behind schedule). */
508 GCSize estimate; /* Estimate of memory actually in use. */
506 MSize stepmul; /* Incremental GC step granularity. */ 509 MSize stepmul; /* Incremental GC step granularity. */
507 MSize debt; /* Debt (how much GC is behind schedule). */
508 MSize estimate; /* Estimate of memory actually in use. */
509 MSize pause; /* Pause between successive GC cycles. */ 510 MSize pause; /* Pause between successive GC cycles. */
510} GCState; 511} GCState;
511 512