mirror of
https://github.com/curl/curl.git
synced 2026-08-04 20:06:19 +03:00
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:
parent
caca034302
commit
02c78ecf81
2 changed files with 48 additions and 1 deletions
|
|
@ -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 *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue