Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!texbell!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: Re: Amigix.library in progress... (was Re: Wildcards) Message-ID: <5451@sugar.hackercorp.com> Date: 25 Mar 90 15:18:05 GMT References: <102618@linus.UUCP> <5405@sugar.hackercorp.com> <5421@sugar.hackercorp.com> <5437@sugar.hackercorp.com> Reply-To: peter@sugar.hackercorp.com (Peter da Silva) Organization: Sugar Land Unix - Houston Lines: 37 > Peter> How about putting this in the C library level, and implement > Peter> sbrk() for the lower level. malloc isn't a system call... Also, > Peter> how about using ANSI C functions (memcpy, memmov, memcmp, etc) > Peter> instead of the non-standard BSD ones? > Because I don't want to force a static data segment. Under Unix, > malloc calls sbrk() which calls brk(). Under Amigix, malloc() will > call AllocMem() and sbrk() and brk() will be be either sumplistic or > dummy-implemented. Sbrk really has the same semantics as AllocMem. On segmented machines it's happy to allocate memory segments and give you memory in chunks that aren't contiguous with each other. You would be quite justified in making sbrk a dummy front end for AllocMem(). > As for the ANSI memory functions... well, the BSD ones aren't _that_ > nonstandard. But no reason not to have both ANSI and BSD ones. For > example, bcopy() and memcpy() can be the same routine, just two > different ways to call it. No, that's bcopy and memmov. memcpy doesn't check argument order. > One problem I have is that I don't have any really good reference for > ANSI library functions... You can get the draft standard from Global Engineering Documents. > As for library calls vs. system calls, the division may not be the > traditional ones. I would recommend providing a traditional division, just for the sake of programmer sanity. -- _--_|\ Peter da Silva . / \ \_.--._/ I haven't lost my mind, it's backed up on tape somewhere! v "Have you hugged your wolf today?" `-_-'