Lines Matching refs:map
34 DexDataMap* map = NULL; in dexDataMapAlloc() local
44 map = (DexDataMap*) malloc(size); in dexDataMapAlloc()
46 if (map == NULL) { in dexDataMapAlloc()
50 map->count = 0; in dexDataMapAlloc()
51 map->max = maxCount; in dexDataMapAlloc()
52 map->offsets = (u4*) (map + 1); in dexDataMapAlloc()
53 map->types = (u2*) (map->offsets + maxCount); in dexDataMapAlloc()
55 return map; in dexDataMapAlloc()
61 void dexDataMapFree(DexDataMap* map) { in dexDataMapFree() argument
67 free(map); in dexDataMapFree()
74 void dexDataMapAdd(DexDataMap* map, u4 offset, u2 type) { in dexDataMapAdd() argument
75 assert(map != NULL); in dexDataMapAdd()
76 assert(map->count < map->max); in dexDataMapAdd()
78 if ((map->count != 0) && in dexDataMapAdd()
79 (map->offsets[map->count - 1] >= offset)) { in dexDataMapAdd()
81 map->offsets[map->count - 1], offset); in dexDataMapAdd()
85 map->offsets[map->count] = offset; in dexDataMapAdd()
86 map->types[map->count] = type; in dexDataMapAdd()
87 map->count++; in dexDataMapAdd()
94 int dexDataMapGet(DexDataMap* map, u4 offset) { in dexDataMapGet() argument
95 assert(map != NULL); in dexDataMapGet()
99 int max = map->count - 1; in dexDataMapGet()
100 u4* offsets = map->offsets; in dexDataMapGet()
112 return map->types[guessIdx]; in dexDataMapGet()
125 bool dexDataMapVerify(DexDataMap* map, u4 offset, u2 type) { in dexDataMapVerify() argument
126 int found = dexDataMapGet(map, offset); in dexDataMapVerify()