mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Add dontthrow
attribute to most libc functions
This will help C++ code that uses exceptions to be tinier. For example, this change shaves away 1000 lines of assembly code from LLVM's libcxx, which is 0.7% of all assembly instructions in the entire library.
This commit is contained in:
parent
cb19e172da
commit
eeb20775d2
103 changed files with 1455 additions and 1456 deletions
|
@ -24,14 +24,14 @@ char *strdup(const char *) paramsnonnull() mallocesque;
|
|||
char *strndup(const char *, size_t) paramsnonnull() mallocesque;
|
||||
void *aligned_alloc(size_t, size_t) attributeallocalign((1))
|
||||
attributeallocsize((2)) returnspointerwithnoaliases libcesque __wur;
|
||||
int posix_memalign(void **, size_t, size_t);
|
||||
int posix_memalign(void **, size_t, size_t) libcesque;
|
||||
|
||||
int mallopt(int, int);
|
||||
int malloc_trim(size_t);
|
||||
size_t bulk_free(void **, size_t);
|
||||
size_t malloc_usable_size(void *);
|
||||
void **independent_calloc(size_t, size_t, void **);
|
||||
void **independent_comalloc(size_t, size_t *, void **);
|
||||
int mallopt(int, int) libcesque;
|
||||
int malloc_trim(size_t) libcesque;
|
||||
size_t bulk_free(void **, size_t) libcesque;
|
||||
size_t malloc_usable_size(void *) libcesque;
|
||||
void **independent_calloc(size_t, size_t, void **) libcesque;
|
||||
void **independent_comalloc(size_t, size_t *, void **) libcesque;
|
||||
|
||||
wchar_t *wcsdup(const wchar_t *) strlenesque __wur;
|
||||
|
||||
|
@ -48,12 +48,12 @@ struct mallinfo {
|
|||
size_t keepcost; /* releasable (via malloc_trim) space */
|
||||
};
|
||||
|
||||
struct mallinfo mallinfo(void);
|
||||
struct mallinfo mallinfo(void) libcesque;
|
||||
|
||||
size_t malloc_footprint(void);
|
||||
size_t malloc_max_footprint(void);
|
||||
size_t malloc_footprint_limit(void);
|
||||
size_t malloc_set_footprint_limit(size_t);
|
||||
size_t malloc_footprint(void) libcesque;
|
||||
size_t malloc_max_footprint(void) libcesque;
|
||||
size_t malloc_footprint_limit(void) libcesque;
|
||||
size_t malloc_set_footprint_limit(size_t) libcesque;
|
||||
void malloc_inspect_all(void (*)(void *, void *, size_t, void *), void *);
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue