Lines Matching defs:chunk

84  * Per-page information for a memory chunk.
87 * chunks. The chunk information is stored in the memory_chunk structure.
1468 mem_chunk_init(memory_chunk_t *chunk, uintptr_t end, size_t psz)
1470 chunk->end_addr = end;
1471 chunk->page_size = psz;
1472 chunk->page_index = 0;
1473 chunk->chunk_start = chunk->chunk_end = 0;
1477 * Create a new chunk of addresses starting from vaddr.
1478 * Pass the whole chunk to pr_meminfo to collect lgroup and page size
1479 * information for each page in the chunk.
1482 mem_chunk_get(memory_chunk_t *chunk, uintptr_t vaddr)
1484 page_descr_t *pdp = chunk->page_info;
1485 size_t psz = chunk->page_size;
1496 chunk->chunk_start = vaddr;
1497 chunk->page_index = 0; /* reset index for the new chunk */
1503 for (i = 0, pdp = chunk->page_info;
1504 (i < MAX_MEMINFO_CNT) && (addr <= chunk->end_addr);
1513 /* Mark the number of entries in the chunk and the last address */
1514 chunk->page_count = i;
1515 chunk->chunk_end = addr - psz;
1528 pdp = chunk->page_info;
1553 * mchunk Initialized memory chunk structure
1607 * information for an address, use it, otherwise shift the chunk window to the
1608 * vaddr and create a new chunk with known meminfo information.
1611 addr_to_lgrp(memory_chunk_t *chunk, uintptr_t vaddr, size_t *psz)
1617 *psz = chunk->page_size;
1623 * Is there information about this address? If not, create a new chunk
1624 * starting from vaddr and apply pr_meminfo() to the whole chunk.
1626 if (vaddr < chunk->chunk_start || vaddr > chunk->chunk_end) {
1628 * This address is outside the chunk, get the new chunk and
1631 mem_chunk_get(chunk, vaddr);
1637 pdp = &chunk->page_info[chunk->page_index];
1638 for (i = chunk->page_index; i < chunk->page_count; i++, pdp++) {
1657 chunk->page_index = i;