Differences From Artifact [2c9c964882]:
- File mod/kcore/testbin.exe.c — part of check-in [acb4a9944e] at 2019-08-22 08:44:29 on branch trunk — add kmlini() and kmlina() functions; restructure allocation functions to work more reasonably (returning a tuple struct instead of making a user pass in a void**); update docs accordingly (user: lexi, size: 565) [annotate] [blame] [check-ins using]
To Artifact [175e42b805]:
- File mod/kcore/testbin.exe.c — part of check-in [f37ee769c9] at 2019-08-22 08:52:25 on branch trunk — add tests for linear allocators, fix dumb bug in kmheapf() that caused it to return an error on success (user: lexi, size: 733) [annotate] [blame] [check-ins using]
26 26 if (alloc.cond != kmcond_ok) return kbad_mem; 27 27 28 28 void* region = alloc.raw; 29 29 kmzero(region,2048); 30 30 31 31 if (kmheapf(region) >= kmcond_fail) return kbad_mem; 32 32 33 + void* top = kmlini(); 34 + kmres rst = kmlina(1230); 35 + if(rst.cond != kmcond_ok) return kbad_mem; 36 + 37 + kmres rst2 = kmlina(789); 38 + if(rst2.cond != kmcond_ok) return kbad_mem; 39 + 33 40 return kbad_ok; 34 41 }