ghash alloc string from render branch
authorCampbell Barton <ideasman42@gmail.com>
Fri, 7 May 2010 07:54:25 +0000 (07:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 7 May 2010 07:54:25 +0000 (07:54 +0000)
 svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r28571:28573
 svn merge https://svn.blender.org/svnroot/bf-blender/branches/render25 -r28575:28576

29 files changed:
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenloader/intern/readblenentry.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/reeb.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/transform/transform.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/makesrna/intern/rna_access.c
source/blender/modifiers/intern/MOD_boolean_util.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/gameengine/Converter/BL_ArmatureObject.cpp

index b4919dd..7d9c9a4 100644 (file)
@@ -49,7 +49,7 @@ BME_TransData_Head *BME_init_transdata(int bufsize) {
        BME_TransData_Head *td;
 
        td = MEM_callocN(sizeof(BME_TransData_Head), "BMesh transdata header");
-       td->gh = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp);
+       td->gh = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp, "BME_init_transdata gh");
        td->ma = BLI_memarena_new(bufsize, "BME_TransData arena");
        BLI_memarena_use_calloc(td->ma);
 
index c5705a0..50552d3 100644 (file)
@@ -549,7 +549,7 @@ void make_pose_channels_hash(bPose *pose)
        if(!pose->chanhash) {
                bPoseChannel *pchan;
 
-               pose->chanhash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+               pose->chanhash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "make_pose_chan gh");
                for(pchan=pose->chanbase.first; pchan; pchan=pchan->next)
                        BLI_ghash_insert(pose->chanhash, pchan->name, pchan);
        }
index f63e28f..1e5f276 100644 (file)
@@ -803,7 +803,7 @@ DagNode * dag_add_node (DagForest *forest, void * fob)
                }
 
                if(!forest->nodeHash)
-                       forest->nodeHash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+                       forest->nodeHash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dag_add_node gh");
                BLI_ghash_insert(forest->nodeHash, fob, node);
        }
 
index a958250..29314fb 100644 (file)
@@ -101,7 +101,7 @@ void BKE_icons_init(int first_dyn_id)
        gFirstIconId = first_dyn_id;
 
        if (!gIcons)
-               gIcons = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+               gIcons = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "icons_init gh");
 }
 
 void BKE_icons_free()
index 902d6b8..8d2ad49 100644 (file)
@@ -1243,7 +1243,7 @@ void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
         *      - this is easier than iterating over all the tracks+strips hierarchy everytime
         *        (and probably faster)
         */
-       gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+       gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "nlastrip_validate_name gh");
        
        for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
                for (tstrip= nlt->strips.first; tstrip; tstrip= tstrip->next) {
index b827494..c06e067 100644 (file)
@@ -3663,7 +3663,7 @@ static void sb_new_scratch(SoftBody *sb)
 {
        if (!sb) return;
        sb->scratch = MEM_callocN(sizeof(SBScratch), "SBScratch");
-       sb->scratch->colliderhash = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp);
+       sb->scratch->colliderhash = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp, "sb_new_scratch gh");
        sb->scratch->bodyface = NULL;
        sb->scratch->totface = 0;
        sb->scratch->aabbmax[0]=sb->scratch->aabbmax[1]=sb->scratch->aabbmax[2] = 1.0e30f;
index ca4347f..92a99c9 100644 (file)
@@ -72,7 +72,7 @@ typedef struct GHashIterator {
        struct Entry *curEntry;
 } GHashIterator;
 
-GHash* BLI_ghash_new           (GHashHashFP hashfp, GHashCmpFP cmpfp);
+GHash* BLI_ghash_new           (GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info);
 void   BLI_ghash_free          (GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
 
 //BM_INLINE void       BLI_ghash_insert        (GHash *gh, void *key, void *val);
index 1a67749..61ddf83 100644 (file)
@@ -102,7 +102,7 @@ bArgs *BLI_argsInit(int argc, char **argv)
 {
        bArgs *ba = MEM_callocN(sizeof(bArgs), "bArgs");
        ba->passes = MEM_callocN(sizeof(int) * argc, "bArgs passes");
-       ba->items = BLI_ghash_new(keyhash, keycmp);
+       ba->items = BLI_ghash_new(keyhash, keycmp, "bArgs passes gh");
        ba->argc = argc;
        ba->argv = argv;
 
index ee31217..11756ad 100644 (file)
@@ -45,8 +45,8 @@ unsigned int hashsizes[]= {
 
 /***/
 
-GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp) {
-       GHash *gh= MEM_mallocN(sizeof(*gh), "GHash");
+GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info) {
+       GHash *gh= MEM_mallocN(sizeof(*gh), info);
        gh->hashfp= hashfp;
        gh->cmpfp= cmpfp;
        gh->entrypool = BLI_mempool_create(sizeof(Entry), 64, 64, 0);
index a189e9f..8aff062 100644 (file)
@@ -303,7 +303,7 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
        GHash *map;
        int i, j, totface;
 
-       map = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+       map = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "build_mesh_leaf_node gh");
        
        node->uniq_verts = node->face_verts = 0;
        totface= node->totprim;
@@ -970,7 +970,7 @@ void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *tot
        void *face, **faces;
        int i, tot;
 
-       map = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       map = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "pbvh_get_grid_updates gh");
 
        pbvh_iter_begin(&iter, bvh, NULL, NULL);
 
index 0b2d610..33827c8 100644 (file)
@@ -283,7 +283,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype)
 LinkNode *BLO_blendhandle_get_linkable_groups(BlendHandle *bh) 
 {
        FileData *fd= (FileData*) bh;
-       GHash *gathered= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       GHash *gathered= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "linkable_groups gh");
        LinkNode *names= NULL;
        BHead *bhead;
        
index a753790..b0c4561 100644 (file)
@@ -5870,7 +5870,7 @@ void generateSkeletonFromReebGraph(Scene *scene, ReebGraph *rg)
        
        ED_armature_to_edit(obedit);
 
-       arcBoneMap = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       arcBoneMap = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "SkeletonFromReebGraph gh");
        
        BLI_markdownSymmetry((BGraph*)rg, rg->nodes.first, scene->toolsettings->skgen_symmetry_limit);
        
index 4be2d23..c2e2175 100644 (file)
@@ -316,8 +316,8 @@ static RigGraph *newRigGraph()
        
        rg->head = NULL;
        
-       rg->bones_map = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
-       rg->controls_map = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+       rg->bones_map = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "newRigGraph bones gh");
+       rg->controls_map = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "newRigGraph cont gh");
        
        rg->free_arc = RIG_freeRigArc;
        rg->free_node = NULL;
@@ -561,7 +561,7 @@ static RigGraph *cloneRigGraph(RigGraph *src, ListBase *editbones, Object *ob, c
        RigControl *ctrl;
        RigGraph *rg;
        
-       ptr_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       ptr_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "cloneRigGraph gh");
 
        rg = newRigGraph();
        
index 5212413..907fe50 100644 (file)
@@ -168,7 +168,7 @@ void BIF_makeListTemplates(const bContext *C)
                BLI_ghash_free(TEMPLATES_HASH, NULL, NULL);
        }
 
-       TEMPLATES_HASH = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+       TEMPLATES_HASH = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "makeListTemplates gh");
        TEMPLATES_CURRENT = 0;
 
        for ( base = FIRSTBASE; base; base = base->next )
index 8c1171e..fd95879 100644 (file)
@@ -348,7 +348,7 @@ ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
        memcpy(cp_arc->buckets, arc->buckets, sizeof(EmbedBucket) * cp_arc->bcount);
        
        /* copy faces map */
-       cp_arc->faces = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       cp_arc->faces = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "copyArc gh");
        mergeArcFaces(rg, cp_arc, arc);
        
        /* find corresponding head and tail */
@@ -2440,7 +2440,7 @@ ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
                
                arc->flag = 0; // clear flag on init
                arc->symmetry_level = 0;
-               arc->faces = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+               arc->faces = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "createArc gh");
                
                if (node1->weight <= node2->weight)
                {
index 760c911..373a4e6 100644 (file)
@@ -660,7 +660,7 @@ static int knife_cut_exec(bContext *C, wmOperator *op)
                eed->tmp.fp = 0.0; 
        
        /*the floating point coordinates of verts in screen space will be stored in a hash table according to the vertices pointer*/
-       gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "knife_cut_exec gh");
        for(eve=em->verts.first; eve; eve=eve->next){
                scr = MEM_mallocN(sizeof(float)*2, "Vertex Screen Coordinates");
                VECCOPY(co, eve->co);
index 3555bfc..8cd8688 100644 (file)
@@ -2729,7 +2729,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
                }
        }
 
-       gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       gh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "subdivideedgenum gh");
 
        // If we are knifing, We only need the selected edges that were cut, so deselect if it was not cut
        if(beauty & B_KNIFE) {
@@ -4091,7 +4091,7 @@ useless:
 
        // populate the SlideVerts
 
-       vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "EdgeSlide gh");
        look = vertlist;
        while(look) {
                i=0;
@@ -4259,7 +4259,7 @@ useless:
 
                for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
 
-                       uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+                       uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "EdgeSlideUV gh");
 
                        for(ev=em->verts.first;ev;ev=ev->next) {
                                ev->tmp.l = 0;
index a08e08c..b7a63b6 100644 (file)
@@ -1374,7 +1374,7 @@ int *mesh_get_x_mirror_faces(Object *ob, EditMesh *em)
 
        mesh_octree_table(ob, em, NULL, 'e');
 
-       fhash= BLI_ghash_new(mirror_facehash, mirror_facecmp);
+       fhash= BLI_ghash_new(mirror_facehash, mirror_facecmp, "mirror_facehash gh");
        for(a=0, mf=mface; a<me->totface; a++, mf++)
                BLI_ghash_insert(fhash, mf, mf);
 
index a3c21a6..2650c2e 100644 (file)
@@ -1260,7 +1260,7 @@ static char *wpaint_make_validmap(Mesh *me, Object *ob)
        bPose *pose;
        bPoseChannel *chan;
        ArmatureModifierData *amd;
-       GHash *gh = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+       GHash *gh = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wpaint_make_validmap gh");
        int i = 0, step1=1;
 
        /*add all names to a hash table*/
index 7f0bc66..8ff397a 100644 (file)
@@ -4343,7 +4343,7 @@ static int createSlideVerts(TransInfo *t)
 
        // populate the SlideVerts
 
-       vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       vertgh = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "createSlideVerts gh");
        look = vertlist;
        while(look) {
                i=0;
@@ -4544,7 +4544,7 @@ static int createSlideVerts(TransInfo *t)
 
                for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
 
-                       uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+                       uvarray[uvlay_idx] = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "createSlideVerts2 gh");
 
                        for(ev=em->verts.first;ev;ev=ev->next) {
                                ev->tmp.l = 0;
index a3196f5..a625065 100644 (file)
@@ -352,7 +352,7 @@ static char *gpu_generate_function_prototyps(GHash *hash)
 GPUFunction *GPU_lookup_function(char *name)
 {
        if(!FUNCTION_HASH) {
-               FUNCTION_HASH = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+               FUNCTION_HASH = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "GPU_lookup_function gh");
                gpu_parse_functions_string(FUNCTION_HASH, datatoc_gpu_shader_material_glsl);
                /*FUNCTION_PROTOTYPES = gpu_generate_function_prototyps(FUNCTION_HASH);
                FUNCTION_LIB = GPU_shader_create_lib(datatoc_gpu_shader_material_glsl);*/
@@ -480,8 +480,8 @@ static void codegen_set_unique_ids(ListBase *nodes)
        GPUOutput *output;
        int id = 1, texid = 0;
 
-       bindhash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
-       definehash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       bindhash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "codegen_set_unique_ids1 gh");
+       definehash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "codegen_set_unique_ids2 gh");
 
        for (node=nodes->first; node; node=node->next) {
                for (input=node->inputs.first; input; input=input->next) {
index c110b89..078b4d9 100644 (file)
@@ -64,7 +64,7 @@ void RNA_init()
 
        for(srna=BLENDER_RNA.structs.first; srna; srna=srna->cont.next) {
                if(!srna->cont.prophash) {
-                       srna->cont.prophash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+                       srna->cont.prophash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "RNA_init gh");
 
                        for(prop=srna->cont.properties.first; prop; prop=prop->next)
                                if(!(prop->flag & PROP_BUILTIN))
index 98f27d7..11d47bf 100644 (file)
@@ -366,7 +366,7 @@ static DerivedMesh *ConvertCSGDescriptorsToDerivedMesh(
 
        // a hash table to remap materials to indices
        if (mat) {
-               material_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+               material_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "CSG_mat gh");
                *totmat = 0;
        }
 
index c946665..05ef85b 100644 (file)
@@ -82,10 +82,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        GHashIterator *hashIter;
        /* maps vert indices in old mesh to indices in new mesh */
        GHash *vertHash = BLI_ghash_new(BLI_ghashutil_inthash,
-                                       BLI_ghashutil_intcmp);
+                                       BLI_ghashutil_intcmp, "build ve apply gh");
        /* maps edge indices in new mesh to indices in old mesh */
        GHash *edgeHash = BLI_ghash_new(BLI_ghashutil_inthash,
-                                       BLI_ghashutil_intcmp);
+                                       BLI_ghashutil_intcmp, "build ed apply gh");
 
        maxVerts = dm->getNumVerts(dm);
        vertMap = MEM_callocN(sizeof(*vertMap) * maxVerts,
index 25781f3..e7f0495 100644 (file)
@@ -129,8 +129,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                 *      - vgroups to indicies -> vgroupHash  (string, int)
                 *      - bones to vgroup indices -> boneHash (index of vgroup, dummy)
                 */
-               vgroupHash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
-               boneHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+               vgroupHash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "mask vgroup gh");
+               boneHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask bone gh");
                
                /* build mapping of names of vertex groups to indices */
                for (i = 0, def = ob->defbase.first; def; def = def->next, i++) 
@@ -175,7 +175,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                }
                
                /* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */
-               vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+               vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert gh");
                
                /* add vertices which exist in vertexgroups into vertHash for filtering */
                for (i = 0; i < maxVerts; i++) 
@@ -224,7 +224,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
                        return dm;
                        
                /* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */
-               vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+               vertHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask vert2 bh");
                
                /* add vertices which exist in vertexgroup into ghash for filtering */
                for (i = 0; i < maxVerts; i++) 
@@ -258,8 +258,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
        }
        
        /* hashes for quickly providing a mapping from old to new - use key=oldindex, value=newindex */
-       edgeHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
-       faceHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+       edgeHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask ed2 gh");
+       faceHash= BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "mask fa2 gh");
        
        /* loop over edges and faces, and do the same thing to 
         * ensure that they only reference existing verts 
index f6d08db..f6be316 100644 (file)
@@ -853,7 +853,7 @@ static float *get_object_orco(Render *re, Object *ob)
        float *orco;
        
        if (!re->orco_hash)
-               re->orco_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+               re->orco_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "get_object_orco gh");
        
        orco = BLI_ghash_lookup(re->orco_hash, ob);
        
@@ -876,7 +876,7 @@ static float *get_object_orco(Render *re, Object *ob)
 static void set_object_orco(Render *re, void *ob, float *orco)
 {
        if (!re->orco_hash)
-               re->orco_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+               re->orco_hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "set_object_orco gh");
        
        BLI_ghash_insert(re->orco_hash, ob, orco);
 }
index bb5f8e9..aa28540 100644 (file)
@@ -988,7 +988,7 @@ void make_sss_tree(Render *re)
 {
        Material *mat;
        
-       re->sss_hash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       re->sss_hash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "make_sss_tree gh");
 
        re->i.infostr= "SSS preprocessing";
        re->stats_draw(re->sdh, &re->i);
index e342874..88d042e 100644 (file)
@@ -318,8 +318,8 @@ StrandShadeCache *strand_shade_cache_create()
        StrandShadeCache *cache;
 
        cache= MEM_callocN(sizeof(StrandShadeCache), "StrandShadeCache");
-       cache->resulthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
-       cache->refcounthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       cache->resulthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "strand_shade_cache_create1 gh");
+       cache->refcounthash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "strand_shade_cache_create2 gh");
        cache->memarena= BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "strand shade cache arena");
        
        return cache;
index 78f16dd..2170115 100644 (file)
@@ -93,7 +93,7 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
        BLI_duplicatelist(&out->chanbase, &src->chanbase);
 
        /* remap pointers */
-       ghash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+       ghash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "game_copy_pose gh");
 
        pchan= (bPoseChannel*)src->chanbase.first;
        outpchan= (bPoseChannel*)out->chanbase.first;