From owner-freebsd-hackers Tue Oct 22 1:32:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16E1937B401 for ; Tue, 22 Oct 2002 01:32:48 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC63443E65 for ; Tue, 22 Oct 2002 01:32:47 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0084.cvx21-bradley.dialup.earthlink.net ([209.179.192.84] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 183uSx-0005rH-00; Tue, 22 Oct 2002 01:32:43 -0700 Message-ID: <3DB50B9F.9C23FA16@mindspring.com> Date: Tue, 22 Oct 2002 01:26:07 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Danny Braniss Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: malloc References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Danny Braniss wrote: > > Your code is not efficient; try this instead: > He, the code is not mine, and the programmer is being invited for > some coffee and indocrination. Good. > The program showed at least two things, 1- the linux emulation ignores > the datasize limit, Possibly. One would expect it to core, then, when you ran out of memory; you said (in your original posting) that it was the FreeBSD version of the code that cored?!? > 2- is faster for this particular case of bad programing. Don't expect FreeBSD to ever optimize system code to make bad programmers look like good programmers. It's not going to happen. > btw, the host has 4gb of main memory, so i don't think it swapped. > actually i just rebooted the machine with no swap to make sure. Then you aren't getting the core dump you said you were. 8-). > I'm not passing judgement as to what is better - though im biased to *BSD - > but the fact is that i have some 1500 users, and some 600 computers, and > (i hope none of my users are reading this) the users are getting less > sophisticated - and when i get complains that it works on Linux, but not under > FreeBSD i try very hard to prove them wrong, but im loosing. If you are fighting that fight, you might as well switch to Windows, and be done with it, because people can make the same argument with "Windows vs. Linux" instead of "Linux vs. FreeBSD", since the issues are exactly analogous: the Windows environment does a much better job than Linux of allowing bad programmers to write code that runs. And Linux does this better than FreeBSD (there are even Linux libraries that will treat NULL pointers as if they were pointers to strings with a value of "" -- and don't think there isn't runtime overhead associated with the extra compares again NULL for each and every strcpy(), strlen(), etc.. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message