Re: Huge memory allocation
- From: jacob navia <jacob@xxxxxxxxxxxxxxxx>
- Date: Wed, 09 May 2007 17:10:27 +0200
Richard Tobin a écrit :
In article <Y_ydnUikEK8JW9zbnZ2dnUVZ_vmqnZ2d@xxxxxxxxxxx>,That's why I recommended
Eric Sosman <esosman@xxxxxxxxxxxxxxxxxxx> wrote:
char *m = malloc(50*1024);
Woops! In this formulation, sizeof(int) -- or, rather,
"rangeof(int)" -- *does* come into play.
Oops! I edited it from 50000 to 50*1024 at the last moment, without
considering the consequences.
-- Richard
calloc(50,1024) in my other post
That should (if calloc has no bugs) do the trick
regardless of the sizeof(int)
.
- Follow-Ups:
- Re: Huge memory allocation
- From: Flash Gordon
- Re: Huge memory allocation
- References:
- Huge memory allocation
- From: sam_cit
- Re: Huge memory allocation
- From: Richard Tobin
- Re: Huge memory allocation
- From: Eric Sosman
- Re: Huge memory allocation
- From: Richard Tobin
- Huge memory allocation
- Prev by Date: Re: Dealing with naive malloc() implementations
- Next by Date: Re: Dealing with naive malloc() implementations
- Previous by thread: Re: Huge memory allocation
- Next by thread: Re: Huge memory allocation
- Index(es):
Relevant Pages
|