pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:284:    * Note also that functions that don't take any arguments, or just    * a many argument just have a MANY node, and no FUNCTION node.    *    * TRANSITIVE has a car with the current state, and a cdr with the    * function type to apply.    *    */   static struct block_allocator type_allocator = BA_INIT(sizeof(struct pike_type), 128);      PMOD_EXPORT void really_free_pike_type(struct pike_type * t) { +  dmalloc_unregister(t, 0);    ba_free(&type_allocator, t);   }      ATTRIBUTE((malloc))   PMOD_EXPORT struct pike_type * alloc_pike_type(void) {    struct pike_type *t = ba_alloc(&type_allocator); -  +  dmalloc_register(t, sizeof(struct pike_type), DMALLOC_LOCATION());    gc_init_marker(t);    return t;   }      PMOD_EXPORT void count_memory_in_pike_types(size_t *n, size_t *s) {    ba_count_all(&type_allocator, n, s);   }      struct pike_type **pike_type_hash = NULL;   size_t pike_type_hash_size = 0;