Ultibo API
C/C++ API for Ultibo Core
Loading...
Searching...
No Matches
system.h
Go to the documentation of this file.
1/*
2 * This file is part of the Ultibo project, https://ultibo.org/
3 *
4 * The MIT License (MIT)
5 *
6 * Copyright (c) 2026 Garry Wood <garry@softoz.com.au>
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 * THE SOFTWARE.
25 */
26#ifndef _ULTIBO_SYSTEM_H
27#define _ULTIBO_SYSTEM_H
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "ultibo/globaltypes.h"
34
36
46
47typedef struct _HEAP_STATUS
48{
49 uint32_t totaladdrspace;
51 uint32_t totalcommitted;
52 uint32_t totalallocated;
53 uint32_t totalfree;
54 uint32_t freesmall;
55 uint32_t freebig;
56 uint32_t unused;
57 uint32_t overhead;
58 uint32_t heaperrorcode;
60
62typedef ssize_t STDCALL (*thread_func)(void * parameter);
64
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif // _ULTIBO_SYSTEM_H
size_t HANDLE
Definition globaltypes.h:51
#define STDCALL
Definition globaltypes.h:45
Definition system.h:39
size_t maxheapsize
Maximum allowed size for the heap, in bytes.
Definition system.h:40
size_t currheapfree
Currently free memory on heap, in bytes.
Definition system.h:44
size_t currheapsize
Current heap size, in bytes.
Definition system.h:42
size_t currheapused
Currently used heap size, in bytes.
Definition system.h:43
size_t maxheapused
Maximum used size for the heap, in bytes.
Definition system.h:41
Definition system.h:48
uint32_t overhead
Total bytes of overhead by memory manager.
Definition system.h:57
uint32_t totaluncommitted
Total amount of uncommitted memory.
Definition system.h:50
uint32_t totalfree
Total amount of free memory.
Definition system.h:53
uint32_t totalcommitted
Total amount of committed memory.
Definition system.h:51
uint32_t freebig
Total amount of free large memory blocks.
Definition system.h:55
uint32_t totaladdrspace
Total amount of available addressable memory.
Definition system.h:49
uint32_t unused
Total amount of free process memory.
Definition system.h:56
uint32_t heaperrorcode
Last error code.
Definition system.h:58
uint32_t totalallocated
Total amount of allocated memory.
Definition system.h:52
uint32_t freesmall
Total amount of free small memory blocks.
Definition system.h:54
Definition system.h:66
uint32_t stacklength
Definition system.h:69
void * threadparameter
Definition system.h:68
thread_func threadfunction
Definition system.h:67
struct _THREAD_INFO THREAD_INFO
ssize_t STDCALL(* thread_func)(void *parameter)
Thread function prototype.
Definition system.h:62
struct _FPC_HEAP_STATUS FPC_HEAP_STATUS
HANDLE THREAD_ID
Type for Thread-IDs.
Definition system.h:63
struct _HEAP_STATUS HEAP_STATUS