|
HPGCC3 Documentation 3.0 R003
|
Standard library. More...
#include <sys.h>Go to the source code of this file.
Defines | |
| #define | _LONGLONG_DEF |
| #define | INVALID_PTR 0 |
| Constant to use with getheapblockinfo() | |
| #define | BLOCK_USED 1 |
| Constant to use with getheapblockinfo() | |
| #define | BLOCK_FREE -1 |
| Constant to use with getheapblockinfo() | |
| #define | RAND_MAX 0x7FFFFFFF |
Typedefs | |
| typedef unsigned long long | ULONGLONG |
| typedef long long | LONGLONG |
| typedef unsigned(* | RNDFUNC )(int) |
| typedef void(* | SRNDFUNC )(unsigned) |
Functions | |
| void * | malloc (size_t) |
| Standard C library function. | |
| void | free (void *) |
| Standard C library function. | |
| int | freemem () |
| Return available free memory in bytes. | |
| void * | calloc (size_t, size_t) |
| Standard C library function. | |
| void * | realloc (void *oldp, size_t size) |
| Standard C library function. | |
| int | getheapblockinfo (void *ptr, void **blkstart, size_t *blksize) |
| Get information about a heap pointer. | |
| void | exit (int) |
| Standard C library function. | |
| int | atexit (void(*__func)(void)) |
| Standard C library function. | |
| unsigned | mwc (int bits) |
| 32 bit multiply with carry pseudo RNG | |
| int | rand (void) |
| wrapper for concrete PRNG implementation If srand() has not been called before the first invocation, srand(1) is being called implicitly. | |
| unsigned int | rand_bits (int bits) |
| void | srand (unsigned int seed) |
| seeds the random sequence with seed. If seed == 0, use entropic seeding based on current time. In this case, the sequence should be nearly unreproduceable, given a sufficient long cycle length of the RNG, which is the case for mwc(). | |
| int | memcmp (const void *s1, const void *s2, size_t n) |
| void | qsort (void *base, size_t n_elements, size_t width, int(*compar)(const void *, const void *)) |
| Standard C library function. | |
| void * | bsearch (register const void *key, register const void *base, register size_t n_elements, register size_t size, int(*compar)(const void *, const void *)) |
| Standard C library function. | |
Variables | |
| RNDFUNC | rand_hook |
| SRNDFUNC | srand_hook |
Standard library.
Definition in file stdlib.h.
| #define BLOCK_FREE -1 |
Constant to use with getheapblockinfo()
| #define BLOCK_USED 1 |
Constant to use with getheapblockinfo()
| #define INVALID_PTR 0 |
Constant to use with getheapblockinfo()
| int atexit | ( | void(*)(void) | __func | ) |
Standard C library function.
| void * bsearch | ( | register const void * | key, |
| register const void * | base, | ||
| register size_t | n_elements, | ||
| register size_t | size, | ||
| int(*)(const void *, const void *) | compar | ||
| ) |
Standard C library function.
| void * calloc | ( | size_t | nelem, |
| size_t | elsize | ||
| ) |
Standard C library function.
| void exit | ( | int | ) |
Standard C library function.
| void free | ( | void * | ) |
Standard C library function.
| int freemem | ( | ) |
Return available free memory in bytes.
| int getheapblockinfo | ( | void * | ptr, |
| void ** | blkstart, | ||
| size_t * | blksize | ||
| ) |
Get information about a heap pointer.
Obtain heap block information, given an arbitrary pointer.
| ptr | Any pointer to get information, does not necessarily need to be pointing to the start of a heap block, pointers within a block are acceptable. |
| blkstart | Address of a pointer to fill the block start information. If ptr falls within a block, its start address will be stored in *blkstart |
| blksize | Address of a pointer to fill the block size information. If ptr falls within a block, its size will be stored in *blksize |
| void * malloc | ( | size_t | ) |
Standard C library function.
| int memcmp | ( | const void * | s1, |
| const void * | s2, | ||
| size_t | n | ||
| ) |
| unsigned mwc | ( | int | bits | ) |
32 bit multiply with carry pseudo RNG
| bits | bit pseudo random number. |
Very fast PRNG with extreme cycle length.
| void qsort | ( | void * | base, |
| size_t | n_elements, | ||
| size_t | width, | ||
| int(*)(const void *, const void *) | compar | ||
| ) |
Standard C library function.
| int rand | ( | void | ) |
| unsigned int rand_bits | ( | int | bits | ) |
| void * realloc | ( | void * | oldp, |
| size_t | size | ||
| ) |
Standard C library function.
| void srand | ( | unsigned int | seed | ) |
seeds the random sequence with seed. If seed == 0, use entropic seeding based on current time. In this case, the sequence should be nearly unreproduceable, given a sufficient long cycle length of the RNG, which is the case for mwc().
| seed | The seed value or 0 (zero) for a system time based value. |