Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!att!rutgers!mailrus!ncar!noao!asuvax!stjhmc!p11.f15.n114.z1.fidonet.org!jim.nutt From: jim.nutt@p11.f15.n114.z1.fidonet.org (jim nutt) Newsgroups: comp.lang.c Subject: Re: How big is the argv[] array? Message-ID: <1074.2369DAC0@stjhmc.fidonet.org> Date: 29 Oct 88 02:19:34 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.25) Organization: FidoNet node 1:114/15.11 - St Joes Hospi, Phoenix AZ Lines: 23 ND> In article <660020@hpclscu.HP.COM>, shankar@hpclscu.HP.COM (Shankar ND> Unni) writes: ND> > argv = (char **) realloc (argv, newsize * sizeof (char *)) ND> > /* newsize is the size of your expanded argv array */ ND> ND> What does realloc do when its first argument is a pointer to storage ND> that was not obtained by malloc? Maybe you won't crash until your ND> program exits and the shell reads the next command line? it varies seriously on microcomputer compilers. borland's turbo c handles it least gracefully, with msc a little more friendly... zortech c waits until the program ends to die.... it also depends on the memory model... jim nutt 'the computer handyman' -- St. Joseph's Hospital/Medical Center - Usenet <=> FidoNet Gateway Uucp: ...{gatech,ames,rutgers}!ncar!noao!asuvax!stjhmc!15.11!jim.nutt Internet: jim.nutt@p11.f15.n114.z1.fidonet.org