Re: [NEWBIE] Limits of stuff

From: George (greerga@CIRCLEMUD.ORG)
Date: 03/04/98


On Wed, 4 Mar 1998, Chuck Reed wrote:

>Anyhow,  I'm hunting for a memory overflow as some may already know, and
>was wondering exactly how much a char *somthing could hold.  I'm mainly

As much as you allocate for it.

char buffer[128] = 127 characters (128th is the NUL)
char *f = malloc(16) = 15 characters (that evil NUL again)
CREATE(c, char, 128); = 127 characters (guess why)

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST