libk  Diff

Differences From Artifact [fd2ee0e61b]:

To Artifact [868113c60d]:


33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
		 * of MAP_ANONYMOUS. munmap needs to be told the size of
		 * the region to unmap (free), which kmheapa() stores at
		 * (ptr - sizeof sz). see kmheap.c for details. */
		k_platform_syscall_arg args[] = { (sz)header, total };
		struct k_platform_syscall_answer r = k_platform_syscall
			(k_platform_syscall_munmap, Kmsz(args), args);

		if(r.error==0) {
			/* we don't need to bother recovering the error
			 * code, there's only one possible munmap error */
			return kmcond_bad_address;
		}

#	else
		Knoimpl(kmheapf,KVos);
#		error missing implementation
#	endif
	return kmcond_ok;
}







|











33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
		 * of MAP_ANONYMOUS. munmap needs to be told the size of
		 * the region to unmap (free), which kmheapa() stores at
		 * (ptr - sizeof sz). see kmheap.c for details. */
		k_platform_syscall_arg args[] = { (sz)header, total };
		struct k_platform_syscall_answer r = k_platform_syscall
			(k_platform_syscall_munmap, Kmsz(args), args);

		if(r.error!=0) {
			/* we don't need to bother recovering the error
			 * code, there's only one possible munmap error */
			return kmcond_bad_address;
		}

#	else
		Knoimpl(kmheapf,KVos);
#		error missing implementation
#	endif
	return kmcond_ok;
}