Shared Persistent Heap Data Environment Manual  1.1.0
sassim.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009-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  */
11 
12 #ifndef __SAS_SIM_H
13 #define __SAS_SIM_H
14 
108 #include <stdlib.h>
109 
115 typedef unsigned long sasseg_t;
116 
117 #ifdef __cplusplus
118 #define __C__ "C"
119 #else
120 #define __C__
121 #endif
122 
128 extern __C__ int sasClearOnDealloc;
129 
136 extern __C__ unsigned long getMemLow();
137 
144 extern __C__ unsigned long getMemHigh();
145 
151 extern __C__ void
152 setSASmemrange (unsigned long low, unsigned long high);
153 
179 extern __C__ int SASJoinRegion();
180 
210 extern __C__ int SASJoinRegionByName (const char * store_name);
211 
228 extern __C__ void *SASBlockAlloc (unsigned long blockSize);
229 
239 extern __C__ void SASBlockDealloc (void *blockAddr, unsigned long blockSize);
240 
255 extern __C__ void SASListFreeRegion ( void **blockAddr,
256  unsigned long *blockSize,
257  int *count);
258 
274 extern __C__ void SASListAllocatedRegion (void **blockAddr,
275  unsigned long *blockSize,
276  int *count);
277 
291 extern __C__ void SASListInUseMem (void **blockAddr, unsigned long *blockSize,
292  int *count);
293 
309 extern __C__ void SASListFreeMem (void **blockAddr, unsigned long *blockSize,
310  int *count);
311 
327 extern __C__ void SASListUncommittedMem (void **blockAddr, unsigned long *blockSize,
328  int *count);
329 
338 extern __C__ unsigned int SASAnchorFreeSpace();
339 
348 extern __C__ void SASReset();
349 
355 extern __C__ void SASSeize();
356 
360 extern __C__ void SASRelease();
361 
371 extern __C__ void SASResetSem();
372 
383 extern __C__ void SASCleanUp ();
384 
394 extern __C__ void SASThreadSetUp ();
395 
403 extern __C__ void SASThreadCleanUp ();
404 
412 extern __C__ void SASRemove();
413 
429 extern __C__ void setSASFinder (void *);
430 
436 extern __C__ void *getSASFinder();
437 
438 #endif /* __SAS_SIM_H */
439 
__C__ void setSASFinder(void *)
Sets the SAS finder pointer to a SAS block or utility object.
__C__ void SASRelease()
Release the anchor block master lock.
__C__ void * SASBlockAlloc(unsigned long blockSize)
Allocate a block of memory within SAS Storage.
__C__ void SASThreadSetUp()
Thread specific setup for secondary thread accessing the SAS region.
__C__ unsigned long getMemLow()
Get the Region's lowest memory address.
__C__ int sasClearOnDealloc
SAS clear on block deallocate flag.
__C__ void SASListInUseMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently allocated block addresses and sizes.
__C__ void SASResetSem()
Reset the internal Semaphores used by Seize/Release the SAS lock manager.
__C__ unsigned int SASAnchorFreeSpace()
Get the current number of free bytes within the Anchor blocks internal heap.
#define __C__
ignore this macro behind the curtain
Definition: sasmsync.h:32
__C__ void SASBlockDealloc(void *blockAddr, unsigned long blockSize)
Deallocate a block of memory within SAS Storage.
__C__ int SASJoinRegionByName(const char *store_name)
Join this process to a named SAS Region.
__C__ void SASThreadCleanUp()
Thread specific cleanup for secondary thread accessing the SAS region.
__C__ void SASListUncommittedMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently uncommitted block addresses and sizes.
__C__ void SASCleanUp()
Process wide cleanup for the SAS runtime. +* +*.
__C__ void setSASmemrange(unsigned long low, unsigned long high)
Set the Region's low/high memory address for testing.
__C__ void SASListFreeRegion(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently free segment block addresses and sizes.
__C__ void SASReset()
Reset the SAS Region back to initial state.
unsigned long sasseg_t
SAS segment ID.
Definition: sassim.h:115
__C__ void SASListFreeMem(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of freed block addresses and sizes.
__C__ void SASListAllocatedRegion(void **blockAddr, unsigned long *blockSize, int *count)
Return lists of currently allocated segment block addresses and sizes.
__C__ void SASRemove()
Remove the SAS Region.
__C__ void SASSeize()
Seize the anchor block master lock.
__C__ unsigned long getMemHigh()
Get the Region's highest memory address.
__C__ void * getSASFinder()
Get the SAS finder address.
__C__ int SASJoinRegion()
Join this process to a SAS Region.