Lines Matching defs:pool

34 void printStringPool(const ResStringPool* pool)
37 const size_t N = pool->size();
40 if (pool->isUTF8()) {
41 uniqueStrings.add(pool->string8At(i, &len));
43 uniqueStrings.add(pool->stringAt(i, &len));
47 printf("String pool of " ZD " unique %s %s strings, " ZD " entries and "
49 (ZD_TYPE)uniqueStrings.size(), pool->isUTF8() ? "UTF-8" : "UTF-16",
50 pool->isSorted() ? "sorted" : "non-sorted",
51 (ZD_TYPE)N, (ZD_TYPE)pool->styleCount(), (ZD_TYPE)pool->bytes());
53 const size_t NS = pool->size();
55 String8 str = pool->string8ObjectAt(s);
176 NOISY(printf("Adding string %s to pool: pos=%d eidx=%d vidx=%d\n",
219 StringPool* pool = (StringPool*)state;
220 const entry& lhe = pool->mEntries[pool->mEntryArray[*static_cast<const size_t*>(lhs)]];
221 const entry& rhe = pool->mEntries[pool->mEntryArray[*static_cast<const size_t*>(rhs)]];
227 LOG_ALWAYS_FATAL_IF(mOriginalPosToNewPos.size() > 0, "Can't sort string pool after already sorted.");
347 sp<AaptFile> pool = new AaptFile(String8(), AaptGroupEntry(),
349 status_t err = writeStringBlock(pool);
350 return err == NO_ERROR ? pool : NULL;
363 status_t StringPool::writeStringBlock(const sp<AaptFile>& pool)
366 if (pool->getSize() > 0) {
371 ssize_t res = pool->writeData(block->getData(), block->getSize());
375 // First we need to add all style span names to the string pool.
377 // will appear at the end of the pool, not disrupting the order
400 // Now build the pool of unique strings.
406 if (pool->editData(preSize) == NULL) {
407 fprintf(stderr, "ERROR: Out of memory for string pool\n");
435 void* dat = (void*)pool->editData(preSize + strPos + totalSize);
437 fprintf(stderr, "ERROR: Out of memory for string pool\n");
464 uint8_t* dat = (uint8_t*)pool->editData(preSize + padPos);
466 fprintf(stderr, "ERROR: Out of memory padding string pool\n");
473 // Build the pool of style spans.
483 uint8_t* dat = (uint8_t*)pool->editData(preSize + styPos + totalSize);
502 // the end of the pool is fully terminated to simplify error
505 uint8_t* dat = (uint8_t*)pool->editData(preSize + styPos + extra);
521 (ResStringPool_header*)pool->padData(sizeof(uint32_t));
523 fprintf(stderr, "ERROR: Out of memory for string pool\n");
529 header->header.size = htodl(pool->getSize());