Differences From Artifact [cc32756862]:
- File kmem/free.fn.c — part of check-in [a8d93823f1] at 2019-08-18 13:42:35 on branch trunk — add functions, generate C syscall table (user: lexi, size: 524) [annotate] [blame] [check-ins using]
- File mod/kmem/free.fn.c — part of check-in [14172a910a] at 2019-08-21 06:00:24 on branch trunk — move modules to a subdirectory in order to keep the directory tree organized and make room for OS-specific build files (user: lexi, size: 524) [annotate] [blame] [check-ins using]
To Artifact [bac849b7ff]:
- File mod/kmem/free.fn.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: 526) [annotate] [blame] [check-ins using]
8 8 * kmfree() frees memory allocated in any manner. 9 9 * it ignores non-dynamically allocated memory, 10 10 * returning kmcond_unnecessary. to check for 11 11 * success, compare result < kmcond_fail. 12 12 */ 13 13 14 14 kmcond kmfree(kmptr ptr) { 15 - if (ptr.kind <= kmkind_fail) return kmcond_unnecessary; 15 + if (ptr.kind <= kmkind_broken) return kmcond_unnecessary; 16 16 switch (ptr.kind) { 17 17 case kmkind_heap: return kmheapf(ptr.ref); 18 18 } 19 19 20 20 return kmcond_unhandled; 21 21 } 22 22