Lines Matching refs:map
34 DexDataMap* map = NULL; in dexDataMapAlloc() local
45 map = (DexDataMap*) malloc(size); in dexDataMapAlloc()
47 if (map == NULL) { in dexDataMapAlloc()
51 map->count = 0; in dexDataMapAlloc()
52 map->max = maxCount; in dexDataMapAlloc()
53 map->offsets = (u4*) (map + 1); in dexDataMapAlloc()
54 map->types = (u2*) (map->offsets + maxCount); in dexDataMapAlloc()
56 return map; in dexDataMapAlloc()
62 void dexDataMapFree(DexDataMap* map) { in dexDataMapFree() argument
68 free(map); in dexDataMapFree()
75 void dexDataMapAdd(DexDataMap* map, u4 offset, u2 type) { in dexDataMapAdd() argument
76 assert(map != NULL); in dexDataMapAdd()
77 assert(map->count < map->max); in dexDataMapAdd()
79 if ((map->count != 0) && in dexDataMapAdd()
80 (map->offsets[map->count - 1] >= offset)) { in dexDataMapAdd()
82 map->offsets[map->count - 1], offset); in dexDataMapAdd()
86 map->offsets[map->count] = offset; in dexDataMapAdd()
87 map->types[map->count] = type; in dexDataMapAdd()
88 map->count++; in dexDataMapAdd()
95 int dexDataMapGet(DexDataMap* map, u4 offset) { in dexDataMapGet() argument
96 assert(map != NULL); in dexDataMapGet()
100 int max = map->count - 1; in dexDataMapGet()
101 u4* offsets = map->offsets; in dexDataMapGet()
113 return map->types[guessIdx]; in dexDataMapGet()
126 bool dexDataMapVerify(DexDataMap* map, u4 offset, u2 type) { in dexDataMapVerify() argument
127 int found = dexDataMapGet(map, offset); in dexDataMapVerify()