Shared Persistent Heap Data Environment Manual 1.4.0
sascompoundheap.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2004-2014 IBM Corporation.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation, Steven Munroe - initial API and implementation
10 * IBM Corporation, Adhemerval Zanella - documentation
11 */
12
13#ifndef __SAS_COMPOUND_HEAP_H
14#define __SAS_COMPOUND_HEAP_H
15
16#include "sassimpleheap.h"
17
119typedef void *SASCompoundHeap_t;
120
121#ifdef __cplusplus
122#define __C__ "C"
123#else
124#define __C__
125#endif
126
144SASCompoundHeapInit (void *heap_block, block_size_t heap_size,
145 block_size_t page_size, int expanding);
146
160
171extern __C__ SASCompoundHeap_t SASCompoundHeapCreate (block_size_t heap_size);
172
185SASCompoundHeapCreatePageSize (block_size_t heap_size,
186 block_size_t page_size);
187
198SASCompoundFixedHeapCreate (block_size_t heap_size);
199
209
216extern __C__ void
218
228
238
249
262
273extern __C__ block_size_t
275
287extern __C__ block_size_t
289
301
313
324extern __C__ block_size_t
326
337extern __C__ block_size_t
339
352
363extern __C__ void
365
377
388extern __C__ void SASCompoundHeapNearDealloc (void *memAddr);
389
399
409extern __C__ block_size_t
411
424
434
444extern __C__ void SASCompoundHeapNearDeallocNoLock (void *memAddr);
445
455extern __C__ void
457 SASSimpleHeap_t free_block);
458
459#endif /* __SAS_COMPOUND_HEAP_H */
__C__ int SASCompoundHeapGetLoadFactor(SASCompoundHeap_t *heap)
Return the load factor from SAS Compound Heap heap.
__C__ SASCompoundHeap_t SASCompoundHeapCreate(block_size_t heap_size)
Create a new SAS Compound Heap with heap_size size.
__C__ block_size_t SASCompoundHeapFreeSpace(SASCompoundHeap_t heap)
Return the total available free space on SAS Compound heap heap.
__C__ block_size_t SASCompoundHeapFreeSpaceNoLock(SASCompoundHeap_t heap)
Return the total available free space on SAS Compound heap heap.
__C__ void SASCompoundHeapNearDealloc(void *memAddr)
Free the allocated SAS Simple Heap based on a contained memAddr.
__C__ SASSimpleHeap_t SASCompoundHeapAlloc(SASCompoundHeap_t heap)
Sub-Allocate a new SAS Simple Heap from a SAS Compound Heaps internal space.
__C__ block_size_t SASCompoundHeapRandomAccessAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments pages will be needed soon and will be ac...
__C__ void SASCompoundHeapDestroyNoLock(SASCompoundHeap_t heap)
Destroy the SAS Compound Heap heap.
__C__ block_size_t SASCompoundHeapSeqAccessAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments pages will be needed soon and will be ac...
__C__ SASSimpleHeap_t SASCompoundHeapNearAlloc(void *nearObj)
Allocate a new SAS Simple Heap from SAS Compound Heap nearObj.
__C__ block_size_t SASCompoundHeapAllocSpace(SASCompoundHeap_t heap)
Return the total block space allocated to this SAS Compound heap heap.
__C__ block_size_t SASCompoundHeapAllocSize(SASCompoundHeap_t heap)
Return the page size from SAS Compound Heap heap.
__C__ SASCompoundHeap_t SASCompoundHeapExpandCreate(SASCompoundHeap_t heap)
Create an expanding SAS Compound Heap based on existing heap.
__C__ void SASCompoundHeapSetLoadFactor(SASCompoundHeap_t *heap, int load)
Set the SAS Compound Heap heap load factor to load.
void * SASCompoundHeap_t
Handle to SAS Compound Heap. The type is SAS_RUNTIME_COMPOUNDHEAP.
Definition: sascompoundheap.h:119
__C__ block_size_t SASCompoundHeapWriteAll(SASCompoundHeap_t heap, int asyncBool)
Write down the SAS Compound Heap to persistent storage.
__C__ void SASCompoundHeapFreeNoLock(SASCompoundHeap_t heap, SASSimpleHeap_t free_block)
Free the allocated SAS Simple Heap free_block from SAS Compound Heap heap.
__C__ SASSimpleHeap_t SASCompoundHeapAllocNoLock(SASCompoundHeap_t heap)
Sub-Allocate a new SAS Simple Heap from a SAS Compound Heaps internal space.
__C__ block_size_t SASCompoundHeapBringAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments pages will be needed soon.
__C__ block_size_t SASCompoundHeapPurgeAll(SASCompoundHeap_t heap, int asyncBool)
Write down the SAS Compound Heap to persistent storage and inform the kernel that those pages can be ...
__C__ void SASCompoundHeapDestroy(SASCompoundHeap_t heap)
Destroy the SAS Compound Heap heap.
__C__ SASCompoundHeap_t SASCompoundHeapCreatePageSize(block_size_t heap_size, block_size_t page_size)
Create a new SAS Compound Heap with heap_size size and page_size page size.
__C__ void SASCompoundHeapFree(SASCompoundHeap_t heap, SASSimpleHeap_t free_block)
Free the allocated SAS Simple Heap block in the SAS Compound Heap heap.
__C__ block_size_t SASCompoundHeapReleaseAll(SASCompoundHeap_t heap)
Inform the kernel that the SAS Compound Heap memory segments can be removed from real memory.
__C__ void SASCompoundHeapNearDeallocNoLock(void *memAddr)
Free the allocated SAS Simple Heap memAddr from associated SAS Compound Heap.
__C__ SASCompoundHeap_t SASCompoundHeapInit(void *heap_block, block_size_t heap_size, block_size_t page_size, int expanding)
Initialize a shared storage as a compound heap.
__C__ SASCompoundHeap_t SASCompoundFixedHeapCreate(block_size_t heap_size)
Create a new non expanding SAS Compound heap with heap_size.
__C__ SASSimpleHeap_t SASCompoundHeapNearAllocNoLock(void *nearObj)
Allocate a new SAS Simple Heap from SAS Compound Heap nearObj.
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
Shared Address Space Simple Heap.
void * SASSimpleHeap_t
Handle to SAS Simple Space. The type is SAS_RUNTIME_SIMPLEHEAP.
Definition: sassimpleheap.h:34