In article <1992Feb1.153354.1@ttd.teradyne.com> nichols@ttd.teradyne.com writes:Well, finally at least one person agrees with me :-) Here's another example of why I find it annoying that malloc(0) is treated as a special case of malloc(N) - it makes it more difficult to cleanly handle arrays whose size is computed at run time. Consider: /* process an array of N `Things' */ function(Thing x[], int N) { /* say we need to stash away a copy of x[] for awhile */ Thing *stash = malloc(N * sizeof(Thing)); /* check for out of memory (oops, must handle special case of N==0) */ if (!stash && N) error(); /* fill the array */ for (i = 0; i < N; ++i) stash[i] = x[i]; /* then sometime later (oops, must handle special case of N==0) */ if (stash) free(stash); } Ok, I'll stop beating a dead horse. Judging from some of the (surprisingly obnoxious) messages in my mailbox, I seem to be in the minority on this issue. flame on... Some people seem to feel that any mail originating from an IBM gateway must be from some guy who just climbed off a 370 mainframe. Hey, believe it or not, there ARE people here who grew up on unix (real unix, not just AIX), love it as much as you do, and depend on it for all their work. So don't pre-judge ok? ...flame off -- Derek Lieber derek@watson.ibm.com
| Ingo Molnar | [patch 12/13] syslets: x86: optimized copy_uatom() |
| Greg Kroah-Hartman | [PATCH 017/196] aoechr: Convert from class_device to device |
| Yinghai Lu | Re: 2.6.26, PAT and AMD family 6 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
git: | |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| David Miller | [GIT]: Networking |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Natalie Protasevich | [BUG] New Kernel Bugs |
