Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!purdue!sage.cc.purdue.edu!ar4 From: ar4@sage.cc.purdue.edu (Piper Keairnes) Newsgroups: comp.sys.mac.programmer Subject: malloc() and calloc() Message-ID: <3860@sage.cc.purdue.edu> Date: 23 Mar 90 14:12:27 GMT Organization: Purdue University Lines: 25 Well the last time this discussion was around, I didn't know that the heck these two functions meant (or how C worked for that matter). Things have changed, but I believe I'm running into the same problem that others did: I CAN do the following successfully: int *i; i = (int*) malloc(sizeof(int) * 5); but if CANNOT do the following: int *i; i = (int*) malloc(sizeof(int) * 6); Notice the difference??? Trying to allocate 5 gives me a valid pointer. Trying to allocate 6 gives me 0x000000. the big NULL! Anyways, anyone know why this is happening? I'm on a 2.5meg SE (don't believe a lack of memory to be the problem). ----- Piper Keairnes ar4@sage.cc.purdue.edu