Publish VCC Plus OSS source distribution for 3.6.2 build 60

This commit is contained in:
Brian Holman committed 2026-11-13 00:14:03 -07:00
commit c652a5276d
1192 files changed
+272368

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Count on the pool to reject a request larger than its region. Link wydealloc. */
#include <wydealloc.h>
#include <cmoc.h>
static unsigned char storage[64];
int main(void)
{
MemPool pool;
void *small, *tooBig;
if (!MemPool_init(&pool, storage, storage + sizeof(storage)))
return 1;
small = MemPool_alloc(&pool, 8);
tooBig = MemPool_alloc(&pool, 80);
printf("SMALL %s, LARGE %s\n", small ? "OK" : "FAILED", tooBig ? "OK" : "REFUSED");
MemPool_free(&pool, small);
MemPool_free(&pool, tooBig);
small = MemPool_alloc(&pool, 8);
printf("AFTER FREE: %s\n", small ? "OK" : "FAILED");
MemPool_free(&pool, small);
return 0;
}