allow out-of-memory testing by setting a limit. That number of memory

allocation calls will succeed, the following will return NULL!
This commit is contained in:
Daniel Stenberg 2003-08-14 14:19:36 +00:00
parent caca034302
commit 02c78ecf81
2 changed files with 48 additions and 1 deletions

View file

@ -39,6 +39,8 @@
#include <memory.h>
#endif
#define logfile curl_debuglogfile
extern FILE *logfile;
/* memory functions */
@ -47,6 +49,7 @@ void *curl_dorealloc(void *ptr, size_t size, int line, const char *source);
void curl_dofree(void *ptr, int line, const char *source);
char *curl_dostrdup(const char *str, int line, const char *source);
void curl_memdebug(const char *logname);
void curl_memlimit(long limit);
/* file descriptor manipulators */
int curl_socket(int domain, int type, int protocol, int, const char *);