Download moonloader/lib/libtcc/include/malloc.h from nttl050611/GTASA: direct link, hf CLI and curl.
- Browser
- Download file 5.21 kB
-
https://huggingface.co/datasets/nttl050611/GTASA/resolve/main/moonloader/lib/libtcc/include/malloc.h
- Command line
-
hf download hf://datasets/nttl050611/GTASA/moonloader/lib/libtcc/include/malloc.h
-
curl -L -o malloc.h https://huggingface.co/datasets/nttl050611/GTASA/resolve/main/moonloader/lib/libtcc/include/malloc.h
5.21 kB
| /** | |
| * This file has no copyright assigned and is placed in the Public Domain. | |
| * This file is part of the w64 mingw-runtime package. | |
| * No warranty is given; refer to the file DISCLAIMER within this package. | |
| */ | |
| extern "C" { | |
| /* Return codes for _heapwalk() */ | |
| /* Values for _heapinfo.useflag */ | |
| /* The structure used to walk through the heap with _heapwalk. */ | |
| typedef struct _heapinfo { | |
| int *_pentry; | |
| size_t _size; | |
| int _useflag; | |
| } _HEAPINFO; | |
| extern unsigned int _amblksiz; | |
| void *__cdecl calloc(size_t _NumOfElements,size_t _SizeOfElements); | |
| void __cdecl free(void *_Memory); | |
| void *__cdecl malloc(size_t _Size); | |
| void *__cdecl realloc(void *_Memory,size_t _NewSize); | |
| _CRTIMP void *__cdecl _recalloc(void *_Memory,size_t _Count,size_t _Size); | |
| _CRTIMP void __cdecl _aligned_free(void *_Memory); | |
| _CRTIMP void *__cdecl _aligned_malloc(size_t _Size,size_t _Alignment); | |
| _CRTIMP void *__cdecl _aligned_offset_malloc(size_t _Size,size_t _Alignment,size_t _Offset); | |
| _CRTIMP void *__cdecl _aligned_realloc(void *_Memory,size_t _Size,size_t _Alignment); | |
| _CRTIMP void *__cdecl _aligned_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment); | |
| _CRTIMP void *__cdecl _aligned_offset_realloc(void *_Memory,size_t _Size,size_t _Alignment,size_t _Offset); | |
| _CRTIMP void *__cdecl _aligned_offset_recalloc(void *_Memory,size_t _Count,size_t _Size,size_t _Alignment,size_t _Offset); | |
| _CRTIMP int __cdecl _resetstkoflw (void); | |
| _CRTIMP unsigned long __cdecl _set_malloc_crt_max_wait(unsigned long _NewValue); | |
| _CRTIMP void *__cdecl _expand(void *_Memory,size_t _NewSize); | |
| _CRTIMP size_t __cdecl _msize(void *_Memory); | |
| /* tcc implements alloca internally and exposes it (since commit d778bde7). | |
| /* alloca is declared at include/stddef.h (which is distributed with tcc). | |
| */ | |
| _CRTIMP size_t __cdecl _get_sbh_threshold(void); | |
| _CRTIMP int __cdecl _set_sbh_threshold(size_t _NewValue); | |
| _CRTIMP errno_t __cdecl _set_amblksiz(size_t _Value); | |
| _CRTIMP errno_t __cdecl _get_amblksiz(size_t *_Value); | |
| _CRTIMP int __cdecl _heapadd(void *_Memory,size_t _Size); | |
| _CRTIMP int __cdecl _heapchk(void); | |
| _CRTIMP int __cdecl _heapmin(void); | |
| _CRTIMP int __cdecl _heapset(unsigned int _Fill); | |
| _CRTIMP int __cdecl _heapwalk(_HEAPINFO *_EntryInfo); | |
| _CRTIMP size_t __cdecl _heapused(size_t *_Used,size_t *_Commit); | |
| _CRTIMP intptr_t __cdecl _get_heap_handle(void); | |
| static __inline void *_MarkAllocaS(void *_Ptr,unsigned int _Marker) { | |
| if(_Ptr) { | |
| *((unsigned int*)_Ptr) = _Marker; | |
| _Ptr = (char*)_Ptr + _ALLOCA_S_MARKER_SIZE; | |
| } | |
| return _Ptr; | |
| } | |
| static __inline void __cdecl _freea(void *_Memory) { | |
| unsigned int _Marker; | |
| if(_Memory) { | |
| _Memory = (char*)_Memory - _ALLOCA_S_MARKER_SIZE; | |
| _Marker = *(unsigned int *)_Memory; | |
| if(_Marker==_ALLOCA_S_HEAP_MARKER) { | |
| free(_Memory); | |
| } | |
| else if(_Marker!=_ALLOCA_S_STACK_MARKER) { | |
| _ASSERTE(("Corrupted pointer passed to _freea",0)); | |
| } | |
| } | |
| } | |
| typedef int (__cdecl *_HEAPHOOK)(int,size_t,void *,void **); | |
| _CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK _NewHook); | |
| } | |