[get rid of entry header on each memory location, use header at top of page.
John Meacham <john@repetae.net>**20100407052755
 Ignore-this: 1a847809b07e3d778fa2d4d4a9f51b47
] hunk ./src/data/rts/jhc_jgc.c 30
-        union {
-                entry_header_t v;
-                void * _dummy;
-        } u;
hunk ./src/data/rts/jhc_jgc.c 164
+                struct s_page *pg = S_PAGE(e);
hunk ./src/data/rts/jhc_jgc.c 167
-                int offset = e->u.v.tag ? 1 : 0;
-                stack_check(&stack, e->u.v.nptrs);
-                for(int i = offset; i < e->u.v.nptrs + offset; i++) {
+                int offset = pg->pi.tag ? 1 : 0;
+                stack_check(&stack, pg->pi.num_ptrs);
+                for(int i = offset; i < pg->pi.num_ptrs + offset; i++) {
hunk ./src/data/rts/jhc_jgc.c 215
-        entry_t *e = s_alloc(gc, find_cache(sc, arena, (count + 1), nptrs));
-        e->u.v.count = count;
-        e->u.v.nptrs = nptrs;
-        e->u.v.tag = tag;
+        entry_t *e = s_alloc(gc, find_cache(sc, arena, count, nptrs, tag));
hunk ./src/data/rts/jhc_jgc.c 218
-        return (void *)(e + 1);
+        return (void *)e;
hunk ./src/data/rts/jhc_jgc.c 235
-        if(1) {
+        if(0) {
hunk ./src/data/rts/jhc_jgc.h 38
-typedef struct {
-        uint8_t count;
-        uint8_t nptrs;
-        uint16_t tag;
-} entry_header_t;
-
-
hunk ./src/data/rts/jhc_jgc.h 56
-
hunk ./src/data/rts/slub.c 30
-        unsigned short color;
-        unsigned short size;
+        unsigned char color;
+        unsigned char size;
+        unsigned char tag;
+        unsigned char num_ptrs;
hunk ./src/data/rts/slub.c 195
-new_cache(struct s_arena *arena, unsigned short size, unsigned short num_ptrs)
+new_cache(struct s_arena *arena, unsigned short size, unsigned short num_ptrs, unsigned char tag)
hunk ./src/data/rts/slub.c 200
+        sc->pi.tag = tag;
+        sc->pi.num_ptrs = num_ptrs;
hunk ./src/data/rts/slub.c 206
-        sc->num_ptrs = num_ptrs;
hunk ./src/data/rts/slub.c 240
-        // TODO - check if there are internal pointers
hunk ./src/data/rts/slub.c 245
-                return true;
+                return (bool)pg->pi.num_ptrs;
hunk ./src/data/rts/slub.c 251
-find_cache(struct s_cache **rsc, struct s_arena *arena, unsigned short size, unsigned short num_ptrs)
+find_cache(struct s_cache **rsc, struct s_arena *arena, unsigned short size, unsigned short num_ptrs, unsigned char tag)
hunk ./src/data/rts/slub.c 253
-        if(__predict_true(rsc && *rsc)) {
-      //          printf("s_cached: %p\n", rsc);
+        if(__predict_true(rsc && *rsc))
hunk ./src/data/rts/slub.c 255
-        }
-       // printf("s_new: %p\n", rsc);
hunk ./src/data/rts/slub.c 257
-                if(sc->pi.size == size && sc->num_ptrs == num_ptrs)
+                if(sc->pi.size == size && sc->pi.num_ptrs == num_ptrs && sc->pi.tag == tag)
hunk ./src/data/rts/slub.c 260
-        sc = new_cache(arena,size,num_ptrs);
+        sc = new_cache(arena,size,num_ptrs, tag);
hunk ./src/data/rts/slub.c 286
-        printf("  entries: %i words\n",(int)(sc->num_entries*sc->pi.size));
+//        printf("  entries: %i words\n",(int)(sc->num_entries*sc->pi.size));
hunk ./src/data/rts/slub.c 290
-        printf("  color: %i words\n",(int)sc->pi.color);
-        printf("  color_off: %i bytes\n",(int)(sc->pi.color*sizeof(uintptr_t)));
-        printf("  end: %i bytes\n",(int)(sc->pi.color+ sc->num_entries*sc->pi.size)*sizeof(uintptr_t));
-        printf("%20s %9s %9s %9s %9s\n", "page", "num_free", "color", "size", "next_free");
+//        printf("  color: %i words\n",(int)sc->pi.color);
+        printf("  nptrs: %i words\n",(int)sc->pi.num_ptrs);
+        printf("  tag: %i words\n",(int)sc->pi.tag);
+//        printf("  color_off: %i bytes\n",(int)(sc->pi.color*sizeof(uintptr_t)));
+//        printf("  end: %i bytes\n",(int)(sc->pi.color+ sc->num_entries*sc->pi.size)*sizeof(uintptr_t));
+        printf("%20s %9s %9s\n", "page", "num_free", "next_free");
hunk ./src/data/rts/slub.c 298
-            printf("%20p %9i %9i %9i %9i\n", pg, pg->num_free, pg->pi.color, pg->pi.size, pg->next_free);
+            printf("%20p %9i %9i\n", pg, pg->num_free, pg->next_free);
hunk ./src/data/rts/slub.c 302
-            printf("%20p %9i %9i %9i %9i\n", pg, pg->num_free, pg->pi.color, pg->pi.size, pg->next_free);
+            printf("%20p %9i %9i\n", pg, pg->num_free, pg->next_free);