/haiku/src/kits/media/ |
H A D | ChunkCache.cpp | 20 BLocker("media chunk cache"), 23 rtm_create_pool(&fRealTimePool, maxBytes, "media chunk cache"); 77 chunk_buffer* chunk = NULL; local 85 chunk = fChunkCache.front(); 91 return chunk; 95 /* Moves the specified chunk to the unused list. 96 This means the chunk data can be overwritten again. 99 ChunkCache::RecycleChunk(chunk_buffer* chunk) argument 103 rtm_free(chunk->buffer); 104 chunk 117 chunk_buffer* chunk = NULL; local [all...] |
H A D | RealtimeAlloc.cpp | 91 in this chunk. 108 FreeChunk* chunk local 110 chunk->fSize = fSize - splitSize - FreeChunk::NextOffset(); 111 chunk->fNext = fNext; 115 return chunk; 119 /*! Checks if the specified chunk touches this chunk, so 123 FreeChunk::IsTouching(FreeChunk* chunk) argument 125 return chunk 126 && (((uint8*)this + fSize == (uint8*)chunk) 139 Join(FreeChunk* chunk) argument 160 FreeChunk* chunk = pool->free_anchor.fNext; local 179 FreeChunk* chunk = pool->free_anchor.fNext; local 225 FreeChunk* chunk = free_anchor.Next(); local 306 FreeChunk* chunk = (FreeChunk*)pool->heap_base; local 359 FreeChunk* chunk = pool->free_anchor.Next(); local [all...] |
H A D | ChunkCache.h | 46 void RecycleChunk(chunk_buffer* chunk);
|
H A D | MediaExtractor.cpp | 25 // should be 0, to disable the chunk cache set it to 1 157 // and chunk caches 317 // Retrieve next chunk - read it directly, if the cache is drained 318 chunk_buffer* chunk = info.chunkCache->NextChunk(fReader, info.cookie); 320 if (chunk == NULL) 323 info.lastChunk = chunk; 325 *_chunkBuffer = chunk->buffer; 326 *_chunkSize = chunk->size; 327 *mediaHeader = chunk->header; 329 return chunk [all...] |
/haiku/src/add-ons/kernel/file_systems/btrfs/ |
H A D | Chunk.cpp | 23 Chunk::Chunk(btrfs_chunk* chunk, fsblock_t offset) argument 30 + chunk->StripeCount() * sizeof(btrfs_stripe)); 36 memcpy(fChunk, chunk, sizeof(btrfs_chunk) 37 + chunk->StripeCount() * sizeof(btrfs_stripe)); 39 TRACE("chunk[0] length %" B_PRIu64 " owner %" B_PRIu64 " stripe_length %" 41 "sector_size %" B_PRIu32 "\n", chunk->Length(), chunk->Owner(), 42 chunk->StripeLength(), chunk->Type(), chunk [all...] |
H A D | Chunk.h | 19 Chunk(btrfs_chunk* chunk,
|
/haiku/src/system/runtime_loader/ |
H A D | heap.cpp | 27 big chunk, the only entry in the free link list (which is a single 29 When memory is allocated, the smallest free chunk that contains 34 free chunk available. When a chunk is freed, it will be joint 36 To ease list handling, the list anchor itself is a free chunk with 112 FreeChunkKey(const FreeChunk* chunk) argument 114 fSize(chunk->Size()), 115 fChunk(chunk) 119 int Compare(const FreeChunk* chunk) const 121 size_t chunkSize = chunk 202 FreeChunk* chunk = (FreeChunk*)((addr_t)AllocatedAddress() + splitSize); local 217 IsTouching(FreeChunk* chunk) argument 233 Join(FreeChunk* chunk) argument 314 FreeChunk* chunk = sFreeChunkTree.FindMin(); local 345 FreeChunk* chunk = sFreeChunkTree.FindClosest(key, true, true); local 431 FreeChunk* chunk = sFreeChunkTree.FindMin(); local [all...] |
/haiku/src/system/libroot/posix/malloc_hoard2/ |
H A D | arch-specific.cpp | 127 free_chunk *chunk = (free_chunk *)sFreeChunks, *smaller = NULL; local 128 for (; chunk != NULL; chunk = chunk->next) { 129 if (chunk->size < newChunk->size) 130 smaller = chunk; 163 // find chunk in free list 164 free_chunk *chunk = sFreeChunks, *last = NULL; local 165 for (; chunk != NULL; chunk 304 free_chunk *chunk = (free_chunk *)sFreeChunks, *last = NULL, *smaller = NULL; local [all...] |
/haiku/src/servers/app/ |
H A D | ClientMemoryAllocator.cpp | 56 struct chunk* chunk = fChunks.RemoveHead(); local 57 if (chunk == NULL) 60 delete_area(chunk->area); 61 free(chunk); 88 // another chunk, or resize an existing chunk 95 // We need to split the chunk into two parts: the one to keep 114 usedBlock->chunk = best->chunk; 178 struct chunk* chunk = freeBlock->chunk; local 238 struct chunk* chunk; local [all...] |
H A D | ClientMemoryAllocator.h | 19 struct chunk; 22 struct chunk : DoublyLinkedListLinkImpl<struct chunk> { struct in inherits:DoublyLinkedListLinkImpl 29 struct chunk* chunk; member in struct:block 35 typedef DoublyLinkedList<chunk> chunk_list;
|
/haiku/src/system/boot/loader/ |
H A D | heap.cpp | 33 big chunk, the only entry in the free link list (which is a single 35 When memory is allocated, the smallest free chunk that contains 40 free chunk available. When a chunk is freed, it will be joint 42 To ease list handling, the list anchor itself is a free chunk with 118 FreeChunkKey(const FreeChunk* chunk) argument 120 fSize(chunk->Size()), 121 fChunk(chunk) 125 int Compare(const FreeChunk* chunk) const 127 size_t chunkSize = chunk 320 FreeChunk* chunk = (FreeChunk*)((addr_t)AllocatedAddress() + splitSize); local 335 IsTouching(FreeChunk* chunk) argument 351 Join(FreeChunk* chunk) argument 415 FreeChunk* chunk = (FreeChunk*)base; local 435 FreeChunk* chunk = sFreeChunkTree.FindMin(); local 472 FreeChunk* chunk = sFreeChunkTree.FindClosest(FreeChunkKey(size), true, local 583 FreeChunk* chunk = sFreeChunkTree.FindMin(); local 596 FreeChunk* chunk = sFreeChunkTree.FindMin(); local [all...] |
/haiku/src/system/libroot/posix/glibc/extensions/ |
H A D | obstack.c | 148 /* Initialize an obstack H for use. Specify chunk size SIZE (0 means default). 169 register struct _obstack_chunk *chunk; /* points to new chunk */ local 201 chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size); 202 if (!chunk) 204 h->next_free = h->object_base = chunk->contents; 205 h->chunk_limit = chunk->limit 206 = (char *) chunk + h->chunk_size; 207 chunk 228 register struct _obstack_chunk *chunk; /* points to new chunk */ local [all...] |
H A D | obstack.h | 64 The way we do this is to take a large chunk, allocating memory from 65 low addresses. When you want to build a symbol in the chunk you just 66 add chars above the current "high water mark" in the chunk. When you 69 Mostly the chars will not burst over the highest address of the chunk, 70 because you would typically expect a chunk to be (say) 100 times as 80 When the chars burst over a chunk boundary, we allocate a larger 81 chunk, and then copy the partly formed object from the end of the old 82 chunk to the beginning of the new larger chunk. We then carry on 91 We carve out one object at a time from the current chunk 167 struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */ member in struct:obstack [all...] |
/haiku/src/build/libshared/ |
H A D | NaturalCompare.cpp | 39 FetchNaturalChunk(natural_chunk& chunk, const char* source) argument 41 if (chunk.type == natural_chunk::ASCII) { 42 // string chunk 48 strlcpy(chunk.buffer, source, pos + 1); 49 chunk.length = pos; 60 // Number chunk (stop at next white space) 66 strlcpy(chunk.buffer, source, pos + 1); 67 chunk.length = pos; 117 // Different chunk types, just compare the remaining strings 144 // The chunks were equal, proceed with the next chunk [all...] |
/haiku/src/apps/cortex/Persistence/Wrappers/ |
H A D | FlatMessageIO.cpp | 129 ssize_t chunk = 0; local 132 chunk = strlen(pos); 134 chunk = nextBreak - pos; 137 context.writeString(pos, chunk); 140 pos += chunk;
|
/haiku/src/tests/system/kernel/ |
H A D | mmap_cut_tests.cpp | 35 uint8 chunk[128]; local 36 memcpy(chunk, &ptr1[3 * B_PAGE_SIZE], sizeof(chunk)); 43 int status = memcmp(&ptr1[3 * B_PAGE_SIZE], chunk, sizeof(chunk));
|
/haiku/src/add-ons/kernel/file_systems/udf/ |
H A D | Recognition.cpp | 117 MemoryChunk chunk(blockSize); 118 if (chunk.InitCheck() != B_OK) { 121 return chunk.InitCheck(); 131 ssize_t bytesRead = read_pos(device, address, chunk.Data(), blockSize); 134 = (volume_structure_descriptor_header *)(chunk.Data()); 189 MemoryChunk chunk(blockSize); 192 status_t anchorErr = chunk.InitCheck(); 194 ssize_t bytesRead = read_pos(device, address, chunk.Data(), blockSize); 203 anchor = reinterpret_cast<anchor_volume_descriptor*>(chunk.Data()); 346 MemoryChunk chunk(blockSiz [all...] |
/haiku/src/system/kernel/slab/ |
H A D | MemoryManager.h | 159 Chunk* chunk, addr_t chunkAddress, 189 const Chunk* chunk); 191 const Chunk* chunk); 193 const Chunk* chunk); 284 MemoryManager::_ChunkAddress(const MetaChunk* metaChunk, const Chunk* chunk) argument 287 + (chunk - metaChunk->chunks) * metaChunk->chunkSize; 292 MemoryManager::_IsChunkFree(const MetaChunk* metaChunk, const Chunk* chunk) argument 294 return chunk->next == NULL 295 || (chunk->next >= metaChunk->chunks 296 && chunk [all...] |
H A D | MemoryManager.cpp | 255 out.Print("slab memory manager alloc meta chunk: %#" B_PRIxADDR, 276 out.Print("slab memory manager free meta chunk: %#" B_PRIxADDR, 287 AllocateChunk(size_t chunkSize, MetaChunk* metaChunk, Chunk* chunk) argument 292 fChunk(chunk - metaChunk->chunks) 299 out.Print("slab memory manager alloc chunk: size: %" B_PRIuSIZE 300 " -> meta chunk: %#" B_PRIxADDR ", chunk: %" B_PRIu32, fChunkSize, 314 Chunk* chunk) 320 fChunk(chunk - metaChunk->chunks) 328 ", count %" B_PRIu32 " -> meta chunk 313 AllocateChunks(size_t chunkSize, uint32 chunkCount, MetaChunk* metaChunk, Chunk* chunk) argument 342 FreeChunk(MetaChunk* metaChunk, Chunk* chunk) argument 538 Chunk* chunk; local 584 Chunk* chunk = &metaChunk->chunks[chunkIndex]; local 657 Chunk* chunk; local 734 Chunk* chunk = &metaChunk->chunks[chunkIndex]; local 884 Chunk* chunk = metaChunk->chunks + k; local 932 Chunk* chunk = &metaChunk->chunks[chunkIndex]; local 1076 Chunk* chunk = *chunkPointer; local 1166 _FreeChunk(Area* area, MetaChunk* metaChunk, Chunk* chunk, addr_t chunkAddress, bool alreadyUnmapped, uint32 flags) argument 1626 _IsChunkInFreeList(const MetaChunk* metaChunk, const Chunk* chunk) argument 1775 Chunk* chunk = metaChunk->chunks + k; local 1848 Chunk* chunk = metaChunk->chunks + i; local [all...] |
/haiku/src/servers/launch/ |
H A D | BaseJob.cpp | 237 const char* chunk = buffer; local 239 const char* separator = strchr(chunk, '\n'); 241 line.Append(chunk, bytesRead); 244 line.Append(chunk, separator - chunk); 245 chunk = separator + 1;
|
/haiku/src/add-ons/kernel/generic/locked_pool/ |
H A D | locked_pool.c | 26 - if a new chunk of blocks is allocated; 60 size_t header_size; // effective size of chunk header 76 // header of memory chunk 108 chunk_header *chunk; local 119 (void **)&chunk, B_ANY_KERNEL_ADDRESS, chunkSize, 127 chunk->area = area; 128 chunk->num_blocks = numBlocks; 131 // very important: we first create a freelist within the chunk, 137 lastBlock = (char *)chunk + pool->header_size + 164 delete_area(chunk 247 chunk_header *chunk, *next; local [all...] |
/haiku/src/kits/package/hpkg/ |
H A D | PackageFileHeapWriter.cpp | 78 // might refer to the last chunk 83 // no, need to push a new chunk 86 Chunk chunk; local 87 chunk.offset = chunkOffset; 88 chunk.compressedSize = compressedSize; 89 chunk.uncompressedSize = uncompressedSize; 90 chunk.buffer = NULL; 91 if (!fChunks.Add(chunk)) 138 Chunk& chunk = fChunks[fNextReadIndex++]; local 139 chunk 396 const Chunk& chunk = chunkBuffer.ChunkAt(segment.chunkIndex); local [all...] |
/haiku/src/bin/fwcontrol/ |
H A D | fwcrom.c | 412 crom_add_quad(struct crom_chunk *chunk, uint32_t entry) argument 416 index = chunk->data.crc_len; 418 printf("too large chunk %d\n", index); 421 chunk->data.buf[index] = entry; 422 chunk->data.crc_len++; 427 crom_add_entry(struct crom_chunk *chunk, int key, int val) argument 437 return (crom_add_quad(chunk, foo.i)); 464 struct crom_chunk *chunk, const char *buf) 481 tl = (struct csrtext *) &chunk->data; 491 return (crom_add_chunk(src, parent, chunk, CROM_TEXTLEA 463 crom_add_simple_text(struct crom_src *src, struct crom_chunk *parent, struct crom_chunk *chunk, const char *buf) argument 509 struct crom_chunk *chunk, *parent; local [all...] |
/haiku/src/kits/network/libnetservices/ |
H A D | FileRequest.cpp | 87 char chunk[4096]; local 89 chunkSize = file.Read(chunk, sizeof(chunk)); 92 error = fOutput->WriteExactly(chunk, chunkSize, &written);
|
/haiku/src/kits/support/ |
H A D | Url.cpp | 1304 BUrl::_DoUrlEncodeChunk(const BString& chunk, bool strict, bool directory) argument 1308 for (int32 i = 0; i < chunk.Length(); i++) { 1309 if (_IsUnreserved(chunk[i]) 1310 || (directory && (chunk[i] == '/' || chunk[i] == '\\'))) { 1311 result << chunk[i]; local 1313 if (chunk[i] == ' ' && !strict) { 1318 snprintf(hexString, 5, "%X", chunk[i]); 1330 BUrl::_DoUrlDecodeChunk(const BString& chunk, bool strict) argument 1334 for (int32 i = 0; i < chunk 1354 result << chunk[i]; local [all...] |