Path: utzoo!attcan!uunet!cs.utexas.edu!rutgers!texbell!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.tech Subject: sbrk/brk Message-ID: <5457@sugar.hackercorp.com> Date: 26 Mar 90 15:16:23 GMT Organization: Sugar Land Unix - Houston Lines: 32 > I just looked again. Okay, no problem. sbrk can point to malloc(), > perhaps, or a routine that will call malloc() or free() appropriately. Nooooo. sbrk() should point to allocmem, and malloc should call sbrk. that way you can replace sbrk and have malloc know about it. > But brk() will have to be dummy-implemented. Don't implement it at all. It's not universally abailable even on UNIX. > Peter> No, that's bcopy and memmov. memcpy doesn't check argument order. > How so? Presumably there is a source and destination... Yes, but it doesn't check for overlapping moves whether the sources is before the destination or not. It can be inlined by a simple loop. Someone else will have to point you at Global. I just know the name. Peter> I would recommend providing a traditional division, just for Peter> the sake of programmer sanity. > Logically, sure. Technically, well... they'll likely be mixed in the > actual Exec libraries. I hope not. What if I want to run something that doesn't use stdio? (yes, such programs exist, generally in other languages than C) -- _--_|\ Peter da Silva . / \ \_.--._/ I haven't lost my mind, it's backed up on tape somewhere! v "Have you hugged your wolf today?" `-_-'