A sample that associates a 24-bit integer value (color) and name with memory allocated using nmalloc
.
void* red_ptr[100];
void* green_ptr[100];
void* blue_ptr[100];
static void red_thread(void*) {
for (int i = 0; i < 100; ++i) {
char name[16];
}
}
static void green_thread(void*) {
for (int i = 0; i < 100; ++i) {
char name[16];
}
}
static void blue_thread(void*) {
for (int i = 0; i < 100; ++i) {
char name[16];
}
}
static bool SampleMain(int, char**) {
if (e != 0) return false;
if (e != 0) return false;
if (e != 0) return false;
for (int i = 0; i < 100; ++i) {
}
return true;
}
NLIB_MAINFUNC