Home
last modified time | relevance | path

Searched refs:heap (Results 1 – 25 of 36) sorted by relevance

12

/linux-3.4.99/lib/
Dprio_heap.c9 int heap_init(struct ptr_heap *heap, size_t size, gfp_t gfp_mask, in heap_init() argument
12 heap->ptrs = kmalloc(size, gfp_mask); in heap_init()
13 if (!heap->ptrs) in heap_init()
15 heap->size = 0; in heap_init()
16 heap->max = size / sizeof(void *); in heap_init()
17 heap->gt = gt; in heap_init()
21 void heap_free(struct ptr_heap *heap) in heap_free() argument
23 kfree(heap->ptrs); in heap_free()
26 void *heap_insert(struct ptr_heap *heap, void *p) in heap_insert() argument
29 void **ptrs = heap->ptrs; in heap_insert()
[all …]
Dprio_tree.c54 unsigned long *radix, unsigned long *heap) in get_index() argument
61 *heap = HEAP_INDEX(vma); in get_index()
65 *heap = node->last; in get_index()
/linux-3.4.99/drivers/gpu/drm/radeon/
Dradeon_mem.c83 static struct mem_block *alloc_block(struct mem_block *heap, int size, in alloc_block() argument
89 list_for_each(p, heap) { in alloc_block()
98 static struct mem_block *find_block(struct mem_block *heap, int start) in find_block() argument
102 list_for_each(p, heap) in find_block()
135 static int init_heap(struct mem_block **heap, int start, int size) in init_heap() argument
142 *heap = kzalloc(sizeof(**heap), GFP_KERNEL); in init_heap()
143 if (!*heap) { in init_heap()
151 blocks->next = blocks->prev = *heap; in init_heap()
153 (*heap)->file_priv = (struct drm_file *) - 1; in init_heap()
154 (*heap)->next = (*heap)->prev = blocks; in init_heap()
[all …]
/linux-3.4.99/fs/ubifs/
Dlprops.c62 static void move_up_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in move_up_lpt_heap() argument
75 val2 = get_heap_comp_val(heap->arr[ppos], cat); in move_up_lpt_heap()
79 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
80 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
81 heap->arr[ppos] = lprops; in move_up_lpt_heap()
99 static void adjust_lpt_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, in adjust_lpt_heap() argument
109 val2 = get_heap_comp_val(heap->arr[ppos], cat); in adjust_lpt_heap()
113 heap->arr[ppos]->hpos = hpos; in adjust_lpt_heap()
114 heap->arr[hpos] = heap->arr[ppos]; in adjust_lpt_heap()
115 heap->arr[ppos] = lprops; in adjust_lpt_heap()
[all …]
Dfind.c57 struct ubifs_lpt_heap *heap; in valuable() local
63 heap = &c->lpt_heap[cat - 1]; in valuable()
64 if (heap->cnt < heap->max_cnt) in valuable()
141 struct ubifs_lpt_heap *heap; in scan_for_dirty() local
146 heap = &c->lpt_heap[LPROPS_FREE - 1]; in scan_for_dirty()
147 for (i = 0; i < heap->cnt; i++) { in scan_for_dirty()
148 lprops = heap->arr[i]; in scan_for_dirty()
238 struct ubifs_lpt_heap *heap, *idx_heap; in ubifs_find_dirty_leb() local
284 heap = &c->lpt_heap[LPROPS_DIRTY - 1]; in ubifs_find_dirty_leb()
304 if (heap->cnt) { in ubifs_find_dirty_leb()
[all …]
Dlpt_commit.c817 struct ubifs_lpt_heap *heap; in populate_lsave() local
844 heap = &c->lpt_heap[LPROPS_DIRTY_IDX - 1]; in populate_lsave()
845 for (i = 0; i < heap->cnt; i++) { in populate_lsave()
846 c->lsave[cnt++] = heap->arr[i]->lnum; in populate_lsave()
850 heap = &c->lpt_heap[LPROPS_DIRTY - 1]; in populate_lsave()
851 for (i = 0; i < heap->cnt; i++) { in populate_lsave()
852 c->lsave[cnt++] = heap->arr[i]->lnum; in populate_lsave()
856 heap = &c->lpt_heap[LPROPS_FREE - 1]; in populate_lsave()
857 for (i = 0; i < heap->cnt; i++) { in populate_lsave()
858 c->lsave[cnt++] = heap->arr[i]->lnum; in populate_lsave()
[all …]
Ddebug.h275 void dbg_dump_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat);
300 void dbg_check_heap(struct ubifs_info *c, struct ubifs_lpt_heap *heap, int cat,
404 struct ubifs_lpt_heap *heap, in dbg_dump_heap() argument
442 struct ubifs_lpt_heap *heap, in dbg_check_heap() argument
Dlpt.c2108 struct ubifs_lpt_heap *heap; in dbg_chk_pnode() local
2170 heap = &c->lpt_heap[cat - 1]; in dbg_chk_pnode()
2171 if (lprops->hpos < heap->cnt && in dbg_chk_pnode()
2172 heap->arr[lprops->hpos] == lprops) in dbg_chk_pnode()
/linux-3.4.99/arch/x86/kernel/
Dtest_nx.c114 char *heap; in test_NX() local
128 heap = kmalloc(64, GFP_KERNEL); in test_NX()
129 if (!heap) in test_NX()
131 heap[0] = 0xC3; /* opcode for "ret" */ in test_NX()
133 if (test_address(heap)) { in test_NX()
137 kfree(heap); in test_NX()
/linux-3.4.99/include/linux/
Dprio_heap.h32 extern int heap_init(struct ptr_heap *heap, size_t size, gfp_t gfp_mask,
39 void heap_free(struct ptr_heap *heap);
54 extern void *heap_insert(struct ptr_heap *heap, void *p);
Dcgroup.h380 struct ptr_heap *heap; member
/linux-3.4.99/Documentation/
Dprio_tree.txt23 2 different ways: 1) All vmas with the same radix _and_ heap indices are
25 index, but different heap indices and if the regular radix-priority-search
27 vmas using heap and size indices instead of heap and radix indices. For
37 are indexed using heap and radix indices whereas the overflow-sub-trees below
39 indexed using heap and size indices. In overflow-sub-trees the size_index
56 ------- ----- ------ ----- | heap-and-radix
67 6 [0,2,2] [2,1,3] | heap-and-size
75 of the heap-and-radix indexed tree. Since prio_tree_root->index_bits is
81 is indexed properly using heap and radix indices.
88 heap-and-size indexed overflow-sub-trees using prio_tree->index_bits.
/linux-3.4.99/lib/zlib_deflate/
Ddeftree.c352 top = s->heap[SMALLEST]; \
353 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
377 int v = s->heap[k]; in pqdownheap()
382 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { in pqdownheap()
386 if (smaller(tree, v, s->heap[j], s->depth)) break; in pqdownheap()
389 s->heap[k] = s->heap[j]; k = j; in pqdownheap()
394 s->heap[k] = v; in pqdownheap()
430 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ in gen_bitlen()
433 n = s->heap[h]; in gen_bitlen()
474 m = s->heap[--h]; in gen_bitlen()
[all …]
Ddefutil.h179 int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ member
/linux-3.4.99/arch/x86/boot/compressed/
Dmisc.c328 asmlinkage void decompress_kernel(void *rmode, memptr heap, in decompress_kernel() argument
355 free_mem_ptr = heap; /* Heap */ in decompress_kernel()
356 free_mem_end_ptr = heap + BOOT_HEAP_SIZE; in decompress_kernel()
361 if (heap > 0x3fffffffffffUL) in decompress_kernel()
364 if (heap > ((-__PAGE_OFFSET-(128<<20)-1) & 0x7fffffff)) in decompress_kernel()
/linux-3.4.99/kernel/
Dcpuset.c847 static void update_tasks_cpumask(struct cpuset *cs, struct ptr_heap *heap) in update_tasks_cpumask() argument
854 scan.heap = heap; in update_tasks_cpumask()
866 struct ptr_heap heap; in update_cpumask() local
898 retval = heap_init(&heap, PAGE_SIZE, GFP_KERNEL, NULL); in update_cpumask()
912 update_tasks_cpumask(cs, &heap); in update_cpumask()
914 heap_free(&heap); in update_cpumask()
1049 struct ptr_heap *heap) in update_tasks_nodemask() argument
1058 scan.heap = heap; in update_tasks_nodemask()
1095 struct ptr_heap heap; in update_nodemask() local
1137 retval = heap_init(&heap, PAGE_SIZE, GFP_KERNEL, NULL); in update_nodemask()
[all …]
Dcgroup.c2849 struct ptr_heap *heap; in cgroup_scan_tasks() local
2852 if (scan->heap) { in cgroup_scan_tasks()
2854 heap = scan->heap; in cgroup_scan_tasks()
2855 heap->gt = &started_after; in cgroup_scan_tasks()
2858 heap = &tmp_heap; in cgroup_scan_tasks()
2859 retval = heap_init(heap, PAGE_SIZE, GFP_KERNEL, &started_after); in cgroup_scan_tasks()
2878 heap->size = 0; in cgroup_scan_tasks()
2893 dropped = heap_insert(heap, p); in cgroup_scan_tasks()
2915 if (heap->size) { in cgroup_scan_tasks()
2916 for (i = 0; i < heap->size; i++) { in cgroup_scan_tasks()
[all …]
/linux-3.4.99/arch/mips/boot/compressed/
Dhead.S35 PTR_LA a0, (.heap) /* heap address */
55 .comm .heap,BOOT_HEAP_SIZE,4
/linux-3.4.99/arch/m32r/boot/compressed/
Dmisc.c77 unsigned int zimage_len, unsigned long heap) in decompress_kernel() argument
85 free_mem_ptr = heap; in decompress_kernel()
/linux-3.4.99/drivers/gpu/drm/nouveau/
Dnouveau_mm.c157 struct nouveau_mm_node *node, *heap = in nouveau_mm_fini() local
173 kfree(heap); in nouveau_mm_fini()
Dnouveau_fence.c283 ret = drm_mm_pre_get(&dev_priv->fence.heap); in semaphore_alloc()
288 sema->mem = drm_mm_search_free(&dev_priv->fence.heap, size, 0, 0); in semaphore_alloc()
588 ret = drm_mm_init(&dev_priv->fence.heap, 0, in nouveau_fence_init()
609 drm_mm_takedown(&dev_priv->fence.heap); in nouveau_fence_fini()
/linux-3.4.99/Documentation/x86/
Dboot.txt22 Protocol 2.01: (Kernel 1.3.76) Added a heap overrun warning.
67 | Stack/heap | For use by the kernel real-mode code.
87 setup, and stack/heap) was made relocatable to any address between
119 | Stack/heap | For use by the kernel real-mode code.
477 code) of the end of the setup stack/heap, minus 0x0200.
515 the setup heap and 0xA0000; it does not have to be located in the
718 heap and 0xA0000.
737 The real-mode code requires a stack/heap to be set up, as well as
760 thus permitted to give the stack/heap the full 64K segment and locate
775 0x8000-0xdfff Stack and heap
[all …]
/linux-3.4.99/arch/x86/boot/
Dheader.S289 # heap purposes.
318 # for local heap purposes.
/linux-3.4.99/drivers/staging/tidspbridge/
DKconfig52 This can lead to heap corruption. Say Y, to enforce the check for 128
/linux-3.4.99/Documentation/arm/
Dtcm.txt73 memory. Such a heap is great for things like saving

12