MultiverseSocial.com

Channel circle › core 2 Memory

2 Memory: core-level functions

The functions that make up the core channel itself.

241 functions
SignaturePurposeSourceScope
struct BufferChannel * OpenBufferChannel(void)Standard runtime: Join/Leave/Open/Close/Read/Write (bounded mailbox ring, refuse-on-full; defines.h).BufferChannel.c:181public
void CloseBufferChannel(struct BufferChannel *bc)Frees what the channel owns: its data block (AllocMem'd) and the instance slot, which is reused by the next Open.BufferChannel.c:193public
struct Buffer * GetBuffer(int type, int tSize)(no comment)BufferChannel.c:202public
static int NioOk(const struct NioBuffer *b)---- helpers ----MemoryBuffers.c:10static
static int NioRo(const struct NioBuffer *b)(no comment)MemoryBuffers.c:15static
static void * NioAlloc(uint64_t n)(no comment)MemoryBuffers.c:20static
static struct NioBuffer * NioNew(uint8_t *data, int32_t cap, int32_t esz, uint8_t dtype, uint8_t flags, struct NioBuffer *parent)(no comment)MemoryBuffers.c:27static
static struct NioBuffer * NioAllocTyped(int32_t cap, int32_t esz, uint8_t dtype)(no comment)MemoryBuffers.c:47static
static struct NioBuffer * NioWrap(uint8_t *data, int32_t off, int32_t len, int32_t esz, uint8_t dtype)(no comment)MemoryBuffers.c:59static
static struct NioBuffer * NioDup(struct NioBuffer *src)(no comment)MemoryBuffers.c:68static
static struct NioBuffer * NioSlice(struct NioBuffer *src)(no comment)MemoryBuffers.c:81static
static struct NioBuffer * NioCompact(struct NioBuffer *b)(no comment)MemoryBuffers.c:94static
static int NioBe(const struct NioBuffer *b)---- endian ----MemoryBuffers.c:110static
static void PutU16(uint8_t *p, uint16_t v, int be)(no comment)MemoryBuffers.c:115static
static uint16_t GetU16(const uint8_t *p, int be)(no comment)MemoryBuffers.c:120static
static void PutU32(uint8_t *p, uint32_t v, int be)(no comment)MemoryBuffers.c:125static
static uint32_t GetU32(const uint8_t *p, int be)(no comment)MemoryBuffers.c:135static
static void PutU64(uint8_t *p, uint64_t v, int be)(no comment)MemoryBuffers.c:142static
static uint64_t GetU64(const uint8_t *p, int be)(no comment)MemoryBuffers.c:148static
int32_t NioCapacity(const struct NioBuffer *b)---- common Buffer ops ----MemoryBuffers.c:158public
int32_t NioPosition(const struct NioBuffer *b)(no comment)MemoryBuffers.c:159public
int32_t NioLimit(const struct NioBuffer *b)(no comment)MemoryBuffers.c:160public
int32_t NioRemaining(const struct NioBuffer *b)(no comment)MemoryBuffers.c:161public
int NioHasRemaining(const struct NioBuffer *b)(no comment)MemoryBuffers.c:165public
int NioIsReadOnly(const struct NioBuffer *b)(no comment)MemoryBuffers.c:166public
int NioIsDirect(const struct NioBuffer *b)(no comment)MemoryBuffers.c:167public
struct NioBuffer * NioPositionSet(struct NioBuffer *b, int32_t pos)(no comment)MemoryBuffers.c:172public
struct NioBuffer * NioLimitSet(struct NioBuffer *b, int32_t lim)(no comment)MemoryBuffers.c:179public
struct NioBuffer * NioMark(struct NioBuffer *b)(no comment)MemoryBuffers.c:187public
struct NioBuffer * NioReset(struct NioBuffer *b)(no comment)MemoryBuffers.c:193public
struct NioBuffer * NioClear(struct NioBuffer *b)(no comment)MemoryBuffers.c:199public
struct NioBuffer * NioFlip(struct NioBuffer *b)(no comment)MemoryBuffers.c:207public
struct NioBuffer * NioRewind(struct NioBuffer *b)(no comment)MemoryBuffers.c:215public
void NioBufferFree(struct NioBuffer *b)(no comment)MemoryBuffers.c:223public
static int NioHostBe(void)---- typed element byte order (honours NIO_BIG_ENDIAN) ---- Flag ON : elements are stored big-endian (Java default, GPU/wire order). On aMemoryBuffers.c:237static
static void NioLoad(void *dst, const uint8_t *src, size_t n, int be)(no comment)MemoryBuffers.c:243static
static void NioStore(uint8_t *dst, const void *src, size_t n, int be)(no comment)MemoryBuffers.c:252static
struct ByteBuffer * ByteBufferAllocate(int32_t capacity)Char is uint16_t; Object is ChannelData by-value get, pointer putMemoryBuffers.c:344public
struct ByteBuffer * ByteBufferAllocateDirect(int32_t capacity)(no comment)MemoryBuffers.c:348public
struct ByteBuffer * ByteBufferWrap(uint8_t *array, int32_t offset, int32_t length)(no comment)MemoryBuffers.c:354public
struct ByteBuffer * ByteBufferWrapFull(uint8_t *array, int32_t length)(no comment)MemoryBuffers.c:358public
struct ByteBuffer * ByteBufferDuplicate(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:362public
struct ByteBuffer * ByteBufferSlice(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:366public
struct ByteBuffer * ByteBufferAsReadOnlyBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:370public
struct ByteBuffer * ByteBufferCompact(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:376public
int ByteBufferOrder(const struct ByteBuffer *bb)(no comment)MemoryBuffers.c:381public
struct ByteBuffer * ByteBufferOrderSet(struct ByteBuffer *bb, int big_endian)(no comment)MemoryBuffers.c:385public
uint8_t ByteBufferGet(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:393public
uint8_t ByteBufferGetAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:400public
struct ByteBuffer * ByteBufferGetArray(struct ByteBuffer *bb, uint8_t *dst, int32_t off, int32_t len)(no comment)MemoryBuffers.c:405public
struct ByteBuffer * ByteBufferPut(struct ByteBuffer *bb, uint8_t v)(no comment)MemoryBuffers.c:412public
struct ByteBuffer * ByteBufferPutAt(struct ByteBuffer *bb, int32_t index, uint8_t v)(no comment)MemoryBuffers.c:419public
struct ByteBuffer * ByteBufferPutArray(struct ByteBuffer *bb, const uint8_t *src, int32_t off, int32_t len)(no comment)MemoryBuffers.c:426public
struct ByteBuffer * ByteBufferPutBuffer(struct ByteBuffer *bb, struct ByteBuffer *src)(no comment)MemoryBuffers.c:434public
int16_t ByteBufferGetShort(struct ByteBuffer *bb)cleaner explicit multi-byte helpersMemoryBuffers.c:448public
int16_t ByteBufferGetShortAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:456public
struct ByteBuffer * ByteBufferPutShort(struct ByteBuffer *bb, int16_t v)(no comment)MemoryBuffers.c:461public
struct ByteBuffer * ByteBufferPutShortAt(struct ByteBuffer *bb, int32_t index, int16_t v)(no comment)MemoryBuffers.c:468public
uint16_t ByteBufferGetChar(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:475public
uint16_t ByteBufferGetCharAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:479public
struct ByteBuffer * ByteBufferPutChar(struct ByteBuffer *bb, uint16_t v)(no comment)MemoryBuffers.c:483public
struct ByteBuffer * ByteBufferPutCharAt(struct ByteBuffer *bb, int32_t index, uint16_t v)(no comment)MemoryBuffers.c:487public
int32_t ByteBufferGetInt(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:492public
int32_t ByteBufferGetIntAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:500public
struct ByteBuffer * ByteBufferPutInt(struct ByteBuffer *bb, int32_t v)(no comment)MemoryBuffers.c:505public
struct ByteBuffer * ByteBufferPutIntAt(struct ByteBuffer *bb, int32_t index, int32_t v)(no comment)MemoryBuffers.c:512public
int64_t ByteBufferGetLong(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:519public
int64_t ByteBufferGetLongAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:527public
struct ByteBuffer * ByteBufferPutLong(struct ByteBuffer *bb, int64_t v)(no comment)MemoryBuffers.c:532public
struct ByteBuffer * ByteBufferPutLongAt(struct ByteBuffer *bb, int32_t index, int64_t v)(no comment)MemoryBuffers.c:539public
float ByteBufferGetFloat(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:546public
float ByteBufferGetFloatAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:553public
struct ByteBuffer * ByteBufferPutFloat(struct ByteBuffer *bb, float v)(no comment)MemoryBuffers.c:560public
struct ByteBuffer * ByteBufferPutFloatAt(struct ByteBuffer *bb, int32_t index, float v)(no comment)MemoryBuffers.c:566public
double ByteBufferGetDouble(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:573public
double ByteBufferGetDoubleAt(struct ByteBuffer *bb, int32_t index)(no comment)MemoryBuffers.c:580public
struct ByteBuffer * ByteBufferPutDouble(struct ByteBuffer *bb, double v)(no comment)MemoryBuffers.c:587public
struct ByteBuffer * ByteBufferPutDoubleAt(struct ByteBuffer *bb, int32_t index, double v)(no comment)MemoryBuffers.c:593public
static struct NioBuffer * BbAsView(struct ByteBuffer *bb, int32_t esz, uint8_t dtype)as*Buffer views -- share backing store, element-aligned remainingMemoryBuffers.c:601static
struct CharBuffer * ByteBufferAsCharBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:613public
struct ShortBuffer * ByteBufferAsShortBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:615public
struct IntBuffer * ByteBufferAsIntBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:617public
struct LongBuffer * ByteBufferAsLongBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:619public
struct FloatBuffer * ByteBufferAsFloatBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:621public
struct DoubleBuffer * ByteBufferAsDoubleBuffer(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:623public
uint8_t * ByteBufferArray(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:626public
int32_t ByteBufferArrayOffset(struct ByteBuffer *bb)(no comment)MemoryBuffers.c:630public
int ByteBufferHasArray(const struct ByteBuffer *bb)(no comment)MemoryBuffers.c:635public
struct ObjectBuffer * ObjectBufferAllocate(int32_t capacity)(no comment)MemoryBuffers.c:643public
struct ObjectBuffer * ObjectBufferWrap(struct ChannelData *array, int32_t offset, int32_t length)(no comment)MemoryBuffers.c:647public
struct ChannelData ObjectBufferGet(struct ObjectBuffer *ob)(no comment)MemoryBuffers.c:651public
struct ChannelData ObjectBufferGetAt(struct ObjectBuffer *ob, int32_t index)(no comment)MemoryBuffers.c:660public
struct ObjectBuffer * ObjectBufferPut(struct ObjectBuffer *ob, const struct ChannelData *v)(no comment)MemoryBuffers.c:668public
struct ObjectBuffer * ObjectBufferPutAt(struct ObjectBuffer *ob, int32_t index, const struct ChannelData *v)(no comment)MemoryBuffers.c:676public
struct ObjectBuffer * ObjectBufferGetArray(struct ObjectBuffer *ob, struct ChannelData *dst, int32_t off, int32_t len)(no comment)MemoryBuffers.c:683public
struct ObjectBuffer * ObjectBufferPutArray(struct ObjectBuffer *ob, const struct ChannelData *src, int32_t off, int32_t len)(no comment)MemoryBuffers.c:690public
struct ObjectBuffer * ObjectBufferCompact(struct ObjectBuffer *ob)(no comment)MemoryBuffers.c:698public
struct ObjectBuffer * ObjectBufferDuplicate(struct ObjectBuffer *ob)(no comment)MemoryBuffers.c:700public
struct ObjectBuffer * ObjectBufferSlice(struct ObjectBuffer *ob)(no comment)MemoryBuffers.c:702public
struct ChannelData * ObjectBufferArray(struct ObjectBuffer *ob)(no comment)MemoryBuffers.c:704public
int ReadableByteChannelRead(struct ReadableByteChannel *ch, struct ByteBuffer *dst)---- channels ----MemoryBuffers.c:708public
int WritableByteChannelWrite(struct WritableByteChannel *ch, struct ByteBuffer *src)(no comment)MemoryBuffers.c:713public
void ReadableByteChannelClose(struct ReadableByteChannel *ch)(no comment)MemoryBuffers.c:718public
void WritableByteChannelClose(struct WritableByteChannel *ch)(no comment)MemoryBuffers.c:720public
static int MemRIsOpen(struct ReadableByteChannel *self)(no comment)MemoryBuffers.c:730static
static int MemWIsOpen(struct WritableByteChannel *self)(no comment)MemoryBuffers.c:732static
static void MemRClose(struct ReadableByteChannel *self)(no comment)MemoryBuffers.c:734static
static void MemWClose(struct WritableByteChannel *self)(no comment)MemoryBuffers.c:736static
static int MemSIsOpen(struct ScatteringByteChannel *self)(no comment)MemoryBuffers.c:739static
static int MemGIsOpen(struct GatheringByteChannel *self)(no comment)MemoryBuffers.c:741static
static void MemSClose(struct ScatteringByteChannel *self)(no comment)MemoryBuffers.c:743static
static void MemGClose(struct GatheringByteChannel *self)(no comment)MemoryBuffers.c:745static
static int MemXferRead(struct MemChCtx *ctx, struct ByteBuffer *dst)Read up to dst remaining from ctx; -1 EOF, 0 no room, >0 bytes.MemoryBuffers.c:749static
static int MemXferWrite(struct MemChCtx *ctx, struct ByteBuffer *src)Write up to src remaining into ctx; 0 if no space/empty, >0 bytes.MemoryBuffers.c:765static
static int MemRead(struct ReadableByteChannel *self, struct ByteBuffer *dst)(no comment)MemoryBuffers.c:780static
static int MemWrite(struct WritableByteChannel *self, struct ByteBuffer *src)(no comment)MemoryBuffers.c:785static
static int MemReadv(struct ScatteringByteChannel *self, struct ByteBuffer **dsts, int offset, int length)(no comment)MemoryBuffers.c:791static
static int MemWritev(struct GatheringByteChannel *self, struct ByteBuffer **srcs, int offset, int length)(no comment)MemoryBuffers.c:810static
static struct MemChCtx * MemCtxNew(uint8_t *data, int32_t length, int writable)(no comment)MemoryBuffers.c:829static
struct ByteChannel * MemoryByteChannelWrap(uint8_t *data, int32_t length, int writable)(no comment)MemoryBuffers.c:842public
void MemoryByteChannelFree(struct ByteChannel *ch)(no comment)MemoryBuffers.c:862public
struct ScatteringByteChannel * MemoryScatteringWrap(uint8_t *data, int32_t length)Memory-backed scatter/gather channels (share MemChCtx layout).MemoryBuffers.c:872public
void MemoryScatteringFree(struct ScatteringByteChannel *ch)(no comment)MemoryBuffers.c:887public
struct GatheringByteChannel * MemoryGatheringWrap(uint8_t *data, int32_t length)(no comment)MemoryBuffers.c:894public
void MemoryGatheringFree(struct GatheringByteChannel *ch)(no comment)MemoryBuffers.c:909public
int ScatteringByteChannelReadv(struct ScatteringByteChannel *ch, struct ByteBuffer **dsts, int offset, int length)(no comment)MemoryBuffers.c:916public
int GatheringByteChannelWritev(struct GatheringByteChannel *ch, struct ByteBuffer **srcs, int offset, int length)(no comment)MemoryBuffers.c:924public
const struct GPUBackend * GPUCalls(void)(no comment)MemoryChannel.c:26public
void SetGPUBackend(const struct GPUBackend *table)(no comment)MemoryChannel.c:32public
void MemoryCritEnter(void)(no comment)MemoryChannel.c:77public
void MemoryCritLeave(void)(no comment)MemoryChannel.c:78public
int MemoryCritGet(void)(no comment)MemoryChannel.c:87public
void MemoryCritSet(int depth)(no comment)MemoryChannel.c:88public
int MemoryCritDefer(void)(no comment)MemoryChannel.c:89public
void MemoryCritSetHook(void (*fn)(void))(no comment)MemoryChannel.c:94public
static const wchar_t * MemoryTypeName(uint8_t type)(no comment)MemoryChannel.c:102static
static uint8_t MemoryTypeOf(const struct MemoryHandle *mh)(no comment)MemoryChannel.c:116static
static void TableInsert(struct MemoryChannel * restrict mc, struct MemoryHandle * restrict mh)(no comment)MemoryChannel.c:121static
static void TableRemove(struct MemoryChannel * restrict mc, struct MemoryHandle * restrict mh)(no comment)MemoryChannel.c:148static
void * AllocHeap(uint64_t size, const wchar_t *name)Platform-backed allocatorsMemoryChannel.c:170public
void FreeHeap(void *ptr, uint64_t size)(no comment)MemoryChannel.c:177public
void * AllocStack(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:183public
void FreeStack(void *ptr, uint64_t size)(no comment)MemoryChannel.c:191public
void * AllocIPC(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:217public
void FreeIPC(void *ptr, uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:247public
void * AllocIPC(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:268public
void FreeIPC(void *ptr, uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:299public
static void GpumemRelease(struct GPUMemEntry *e)(no comment)MemoryChannel.c:371static
void GPUMemSetDevice(struct SDL_GPUDevice *dev)(no comment)MemoryChannel.c:381public
void * AllocGPU(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:406public
void FreeGPU(void *ptr, uint64_t size)(no comment)MemoryChannel.c:454public
static struct GPUMemEntry * GpumemFind(const void *p)find the LIVE entry whose block contains p (block base or payload pointer); mutex heldMemoryChannel.c:476static
struct SDL_GPUBuffer * GPUMemBuffer(const void *p, uint64_t *offset)(no comment)MemoryChannel.c:489public
static int GpumemSync(const void *p, int dir)0 = synced, -1 = p is not a device-backed block (no device / fallback / dead) or GPU error. dir 0 = host -> GPU, 1 = GPU -> host. Whole block. Synchronous.MemoryChannel.c:506static
int GPUMemUpload(const void *p)(no comment)MemoryChannel.c:562public
int GPUMemDownload(const void *p)(no comment)MemoryChannel.c:563public
int IsMemAllocated(const void *p)IsMemAllocated: 1 if p is a live AllocMem payload tracked by the MemoryChannel table (0 if not tracked, e.g. freed by the CloseMemoryChannel sweep). Without a MemoryChannelMemoryChannel.c:570public
static void GResLock(void)(no comment)MemoryChannel.c:600static
static void GResUnlock(void)(no comment)MemoryChannel.c:601static
static void GResAccount(int64_t d)(no comment)MemoryChannel.c:603static
static void GResRelease(SDL_GPUDevice *dev, uint32_t kind, void *o)(no comment)MemoryChannel.c:615static
uint32_t AllocGPUResource(void *device, uint32_t kind, const void *info, uint64_t bytes, const char *name)(no comment)MemoryChannel.c:629public
static struct GPUResEntry * GResFind(uint32_t h)(no comment)MemoryChannel.c:665static
void * GPUResourceObject(uint32_t h)(no comment)MemoryChannel.c:674public
int FreeGPUResource(uint32_t h)(no comment)MemoryChannel.c:685public
uint32_t GPUResourceCount(void)(no comment)MemoryChannel.c:699public
static uint64_t GResBytes(uint32_t kind, const void *info)Typed forms of AllocGPUResource for code that keeps SDL object pointers (same arguments and result as the SDL_CreateGPU* / SDL_ReleaseGPU* call they replace; bytes derived from info).MemoryChannel.c:711static
static void * GResCreate(SDL_GPUDevice *d, uint32_t kind, const void *info)(no comment)MemoryChannel.c:721static
static void GResFreePtr(SDL_GPUDevice *d, uint32_t kind, void *o)(no comment)MemoryChannel.c:726static
SDL_GPUBuffer * AllocGPUBuffer(SDL_GPUDevice *d, const SDL_GPUBufferCreateInfo *i)(no comment)MemoryChannel.c:737public
SDL_GPUTransferBuffer * AllocGPUTransferBuffer(SDL_GPUDevice *d, const SDL_GPUTransferBufferCreateInfo *i)(no comment)MemoryChannel.c:739public
SDL_GPUTexture * AllocGPUTexture(SDL_GPUDevice *d, const SDL_GPUTextureCreateInfo *i)(no comment)MemoryChannel.c:741public
SDL_GPUComputePipeline * AllocGPUComputePipeline(SDL_GPUDevice *d, const SDL_GPUComputePipelineCreateInfo *i)(no comment)MemoryChannel.c:743public
SDL_GPUGraphicsPipeline * AllocGPUGraphicsPipeline(SDL_GPUDevice *d, const SDL_GPUGraphicsPipelineCreateInfo *i)(no comment)MemoryChannel.c:745public
SDL_GPUShader * AllocGPUShader(SDL_GPUDevice *d, const SDL_GPUShaderCreateInfo *i)(no comment)MemoryChannel.c:747public
SDL_GPUSampler * AllocGPUSampler(SDL_GPUDevice *d, const SDL_GPUSamplerCreateInfo *i)(no comment)MemoryChannel.c:749public
void FreeGPUBuffer(SDL_GPUDevice *d, SDL_GPUBuffer *o)(no comment)MemoryChannel.c:751public
void FreeGPUTransferBuffer(SDL_GPUDevice *d, SDL_GPUTransferBuffer *o)(no comment)MemoryChannel.c:752public
void FreeGPUTexture(SDL_GPUDevice *d, SDL_GPUTexture *o)(no comment)MemoryChannel.c:753public
void FreeGPUComputePipeline(SDL_GPUDevice *d, SDL_GPUComputePipeline *o)(no comment)MemoryChannel.c:754public
void FreeGPUGraphicsPipeline(SDL_GPUDevice *d, SDL_GPUGraphicsPipeline *o)(no comment)MemoryChannel.c:755public
void FreeGPUShader(SDL_GPUDevice *d, SDL_GPUShader *o)(no comment)MemoryChannel.c:756public
void FreeGPUSampler(SDL_GPUDevice *d, SDL_GPUSampler *o)(no comment)MemoryChannel.c:757public
static void GResReleaseDevice(SDL_GPUDevice *dev)(no comment)MemoryChannel.c:759static
void GPUMemStats(int *live, int *dead)(no comment)MemoryChannel.c:774public
void * AllocCloud(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:789public
void FreeCloud(void *ptr, uint64_t size)(no comment)MemoryChannel.c:796public
void * AllocRegistry(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:802public
void FreeRegistry(void *ptr, uint64_t size)(no comment)MemoryChannel.c:808public
void * AllocPage(uint64_t size, const wchar_t *name)(no comment)MemoryChannel.c:814public
void FreePage(void *ptr, uint64_t size)(no comment)MemoryChannel.c:826public
static struct MemoryChannel * OpenMemoryChannelBody(void)MemoryChannel lifecycleMemoryChannel.c:841static
static void CloseMemoryChannelBody(struct MemoryChannel *mc)(no comment)MemoryChannel.c:872static
void * AllocMem(uint64_t tSize, ...)(no comment)MemoryChannel.c:889public
void * AllocMemExt(uint64_t tSize, struct MemoryAllocationRequest *req)(no comment)MemoryChannel.c:1005public
static void FreememRaw(void *ptr)(no comment)MemoryChannel.c:1010static
int MemoryChannelInfo(struct MemoryChannel *mc)Info and controlMemoryChannel.c:1097public
int MemoryChannelReset(struct MemoryChannel *mc)(no comment)MemoryChannel.c:1104public
int MemoryChannelSetName(struct MemoryHandle *mh, const wchar_t *name)(no comment)MemoryChannel.c:1120public
const wchar_t * MemoryChannelGetName(const struct MemoryHandle *mh)(no comment)MemoryChannel.c:1128public
uint64_t MemoryChannelSize(const struct MemoryHandle *mh)(no comment)MemoryChannel.c:1133public
uint64_t MemoryChannelAllocated(const struct MemoryChannel *mc, uint8_t type)(no comment)MemoryChannel.c:1138public
uint64_t MemoryChannelRemaining(const struct MemoryChannel *mc, uint8_t type)(no comment)MemoryChannel.c:1144public
uint32_t MemoryChannelLiveCount(const struct MemoryChannel *mc)(no comment)MemoryChannel.c:1150public
struct MemoryHandle * MemoryChannelFind(struct MemoryChannel *mc, void *payload)(no comment)MemoryChannel.c:1155public
int MemoryChannelSnapshot(struct MemoryChannel *mc, struct MemoryHandle **out, uint32_t max, uint32_t *count)(no comment)MemoryChannel.c:1172public
void MemoryChannelShowTypes(const struct MemoryChannel *mc)(no comment)MemoryChannel.c:1190public
void MemoryChannelShowLeaks(const struct MemoryChannel *mc)(no comment)MemoryChannel.c:1203public
void MemoryChannelShowAll(const struct MemoryChannel *mc)(no comment)MemoryChannel.c:1220public
void MemoryCopy(void * restrict dst, const void * restrict src, uint64_t bytes)Memory operations � restrict on hot pathMemoryChannel.c:1236public
void MemoryZero(void * restrict dst, uint64_t bytes)(no comment)MemoryChannel.c:1241public
int MemoryCompare(const void * restrict a, const void * restrict b, uint64_t bytes)(no comment)MemoryChannel.c:1246public
struct BigUInt128 * GetTotalSystemMemory(void)System memory infoMemoryChannel.c:1255public
uint64_t GetSystemRAM(void)(no comment)MemoryChannel.c:1265public
uint64_t GetUsedMemory(void)(no comment)MemoryChannel.c:1279public
uint64_t GetTotalMemory(void)(no comment)MemoryChannel.c:1293public
uint64_t GetTotalGPUMemory(void)(no comment)MemoryChannel.c:1298public
uint64_t GetGPUUsedMemory(void)(no comment)MemoryChannel.c:1299public
void PrintMemorySize(uint64_t bytes)DiagnosticsMemoryChannel.c:1305public
void PrintMemoryRequest(const struct MemoryAllocationRequest *req)(no comment)MemoryChannel.c:1314public
void ShowMem(void)(no comment)MemoryChannel.c:1325public
void * AllocChannelMem(const wchar_t *name)Shared IPC channel buffer (used by NetXecChannel bootstrap)MemoryChannel.c:1336public
static void McPut32(uint8_t *p, uint32_t v)(no comment)MemoryChannel.c:1363static
static void McPut64(uint8_t *p, uint64_t v)(no comment)MemoryChannel.c:1364static
static uint32_t McGet32(const uint8_t *p)(no comment)MemoryChannel.c:1365static
static uint64_t McGet64(const uint8_t *p)(no comment)MemoryChannel.c:1366static
uint64_t MemoryChannelJoin(void *peer)(no comment)MemoryChannel.c:1368public
void * MemoryChannelLeave(void *peer)(no comment)MemoryChannel.c:1390public
uint64_t MemoryChannelRead(void *chan, void *buf, long len)64-byte BE info record: [0] u32 'MEMC' [4] u32 version 1 [8] u32 live handles [12] u32 peakMemoryChannel.c:1410public
uint64_t MemoryChannelWrite(void *chan, void *buf, long len)(no comment)MemoryChannel.c:1432public
void MemorySetThreadOwner(uint8_t owner)Guru support (open_idem/work): owner tag, exception flag, purge. Declared in memory.h.MemoryChannel.c:1467public
uint8_t MemoryGetThreadOwner(void)(no comment)MemoryChannel.c:1468public
uint32_t MemoryPurgedTotal(void)(no comment)MemoryChannel.c:1469public
uint8_t MemoryHandleOwner(const struct MemoryHandle *mh)(no comment)MemoryChannel.c:1470public
void MemorySetException(int on)(no comment)MemoryChannel.c:1471public
int MemoryGetException(void)(no comment)MemoryChannel.c:1472public
uint32_t MemoryChannelPurgeOwner(uint8_t owner)Free every live handle whose owner tag == owner. Scan under the table lock, free outside it.MemoryChannel.c:1475public
uint32_t MemoryChannelCountOwner(struct MemoryChannel *mc, uint8_t owner)(no comment)MemoryChannel.c:1500public
void FreeMem(void *ptr)FreeMem: normal free. While the Guru exception flag is on, first delete every USER handle; if ptr itself was one of them it is already gone.MemoryChannel.c:1513public
struct MemoryChannel * OpenMemoryChannel(void)Standard runtime entry points (Join/Leave/Read/Write/Open/Close) -- thin wrappers, behaviour of Open/Close unchanged (bodies renamed *Body). See CHREC_RUNTIME in defines.h.MemoryChannel.c:1531public
void CloseMemoryChannel(struct MemoryChannel *mc)(no comment)MemoryChannel.c:1537public

Core 2 in the full manual

The > Web 4 < Channel Paradigm · full manual · privacy · contact

Hits--