home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!sun4nl!and!jos
- From: jos@and.nl (Jos Horsmeier)
- Newsgroups: comp.lang.c
- Subject: Re: How many malloc's can I use?
- Message-ID: <3245@dozo.and.nl>
- Date: 18 Aug 92 12:00:43 GMT
- References: <1992Aug17.181615.11905@proxxi.se>
- Organization: AND Software BV Rotterdam
- Lines: 20
-
- In article <1992Aug17.181615.11905@proxxi.se> elias@proxxi.se (Elias M}rtensson (proxxi)) writes:
- |Does ANSI C specify the maximum number of malloc calls that can safely
- |be made? Can I do a couple of thousand malloc's and still count on
- |that everything will work fine? I am not interested in any
- |descriptions of the MS-DOS limitations or anything like that. I just
- |want to know what ANSI C says.
-
- The standard says nothing about the number of malloc() calls you can do.
- This maximum number is highly dependent on the amount of memory installed
- on your machine.
-
- |And does ANSI C specify that largest block of memory that can be
- |malloc'ed?
-
- The size of the largest possible block has to fit in a size_t integral
- number. (Check your <stddef.h> file ...)
-
- kind regards,
-
- Jos aka jos@and.nl
-