Differences From
Artifact [fd2ee0e61b]:
33 33 * of MAP_ANONYMOUS. munmap needs to be told the size of
34 34 * the region to unmap (free), which kmheapa() stores at
35 35 * (ptr - sizeof sz). see kmheap.c for details. */
36 36 k_platform_syscall_arg args[] = { (sz)header, total };
37 37 struct k_platform_syscall_answer r = k_platform_syscall
38 38 (k_platform_syscall_munmap, Kmsz(args), args);
39 39
40 - if(r.error==0) {
40 + if(r.error!=0) {
41 41 /* we don't need to bother recovering the error
42 42 * code, there's only one possible munmap error */
43 43 return kmcond_bad_address;
44 44 }
45 45
46 46 # else
47 47 Knoimpl(kmheapf,KVos);
48 48 # error missing implementation
49 49 # endif
50 50 return kmcond_ok;
51 51 }