Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2002 01:26:07 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Danny Braniss <danny@cs.huji.ac.il>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: malloc
Message-ID:  <3DB50B9F.9C23FA16@mindspring.com>
References:  <E183u0p-0003SZ-00@cse.cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DB50B9F.9C23FA16>