Software: Apache. PHP/5.6.40 uname -a: Linux cpanel06wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.80.el6.x86_64 #1 SMP Thu Sep 24 uid=851(cp949260) gid=853(cp949260) groups=853(cp949260) Safe-mode: OFF (not secure) /opt/cpanel/ea-openssl11/share/doc/openssl/html/man3/ drwxr-xr-x |
Viewing file: Select action/file-type:
NAMEOPENSSL_malloc_init, OPENSSL_malloc, OPENSSL_zalloc, OPENSSL_realloc, OPENSSL_free, OPENSSL_clear_realloc, OPENSSL_clear_free, OPENSSL_cleanse, CRYPTO_malloc, CRYPTO_zalloc, CRYPTO_realloc, CRYPTO_free, OPENSSL_strdup, OPENSSL_strndup, OPENSSL_memdup, OPENSSL_strlcpy, OPENSSL_strlcat, OPENSSL_hexstr2buf, OPENSSL_buf2hexstr, OPENSSL_hexchar2int, CRYPTO_strdup, CRYPTO_strndup, OPENSSL_mem_debug_push, OPENSSL_mem_debug_pop, CRYPTO_mem_debug_push, CRYPTO_mem_debug_pop, CRYPTO_clear_realloc, CRYPTO_clear_free, CRYPTO_get_mem_functions, CRYPTO_set_mem_functions, CRYPTO_get_alloc_counts, CRYPTO_set_mem_debug, CRYPTO_mem_ctrl, CRYPTO_mem_leaks, CRYPTO_mem_leaks_fp, CRYPTO_mem_leaks_cb, OPENSSL_MALLOC_FAILURES, OPENSSL_MALLOC_FD - Memory allocation functions
SYNOPSIS#include <openssl/crypto.h> int OPENSSL_malloc_init(void) void *OPENSSL_malloc(size_t num) void *OPENSSL_zalloc(size_t num) void *OPENSSL_realloc(void *addr, size_t num) void OPENSSL_free(void *addr) char *OPENSSL_strdup(const char *str) char *OPENSSL_strndup(const char *str, size_t s) size_t OPENSSL_strlcat(char *dst, const char *src, size_t size); size_t OPENSSL_strlcpy(char *dst, const char *src, size_t size); void *OPENSSL_memdup(void *data, size_t s) void *OPENSSL_clear_realloc(void *p, size_t old_len, size_t num) void OPENSSL_clear_free(void *str, size_t num) void OPENSSL_cleanse(void *ptr, size_t len); unsigned char *OPENSSL_hexstr2buf(const char *str, long *len); char *OPENSSL_buf2hexstr(const unsigned char *buffer, long len); int OPENSSL_hexchar2int(unsigned char c); void *CRYPTO_malloc(size_t num, const char *file, int line) void *CRYPTO_zalloc(size_t num, const char *file, int line) void *CRYPTO_realloc(void *p, size_t num, const char *file, int line) void CRYPTO_free(void *str, const char *, int) char *CRYPTO_strdup(const char *p, const char *file, int line) char *CRYPTO_strndup(const char *p, size_t num, const char *file, int line) void *CRYPTO_clear_realloc(void *p, size_t old_len, size_t num, const char *file, int line) void CRYPTO_clear_free(void *str, size_t num, const char *, int) void CRYPTO_get_mem_functions( void *(**m)(size_t, const char *, int), void *(**r)(void *, size_t, const char *, int), void (**f)(void *, const char *, int)) int CRYPTO_set_mem_functions( void *(*m)(size_t, const char *, int), void *(*r)(void *, size_t, const char *, int), void (*f)(void *, const char *, int)) void CRYPTO_get_alloc_counts(int *m, int *r, int *f) int CRYPTO_set_mem_debug(int onoff) env OPENSSL_MALLOC_FAILURES=... <application> env OPENSSL_MALLOC_FD=... <application> int CRYPTO_mem_ctrl(int mode); int OPENSSL_mem_debug_push(const char *info) int OPENSSL_mem_debug_pop(void); int CRYPTO_mem_debug_push(const char *info, const char *file, int line); int CRYPTO_mem_debug_pop(void); int CRYPTO_mem_leaks(BIO *b); int CRYPTO_mem_leaks_fp(FILE *fp); int CRYPTO_mem_leaks_cb(int (*cb)(const char *str, size_t len, void *u), void *u);
DESCRIPTIONOpenSSL memory allocation is handled by the OPENSSL_xxx API. These are generally macro's that add the standard C __FILE__ and __LINE__ parameters and call a lower-level CRYPTO_xxx API. Some functions do not add those parameters, but exist for consistency.
OPENSSL_hexstr2buf() parses str as a hex string and returns a
pointer to the parsed value. The memory is allocated by calling
OPENSSL_buf2hexstr() takes the specified buffer and length, and returns a hex string for value, or NULL on error. Buffer cannot be NULL; if len is 0 an empty string is returned. OPENSSL_hexchar2int() converts a character to the hexadecimal equivalent, or returns -1 on error. If no allocations have been done, it is possible to "swap out" the default
implementations for The default implementation can include some debugging capability (if enabled
at build-time).
This adds some overhead by keeping a list of all memory allocations, and
removes items from the list when they are free'd.
This is most useful for identifying memory leaks.
While checking memory, it can be useful to store additional context
about what is being done.
For example, identifying the field names when parsing a complicated
data structure.
At the end of the program, calling
If the library is built with the The function The variable
OPENSSL_MALLOC_FAILURES controls how often allocations should fail.
It is a set of fields separated by semicolons, which each field is a count
(defaulting to zero) and an optional atsign and percentage (defaulting
to 100). If the count is zero, then it lasts forever. For example,
If the variable OPENSSL_MALLOC_FD is parsed as a positive integer, then it is taken as an open file descriptor, and a record of all allocations is written to that descriptor. If an allocation will fail, and the platform supports it, then a backtrace will be written to the descriptor. This can be useful because a malloc may fail but not be checked, and problems will only occur later. The following example in classic shell syntax shows how to use this (will not work on all platforms): OPENSSL_MALLOC_FAILURES='200;@10' export OPENSSL_MALLOC_FAILURES OPENSSL_MALLOC_FD=3 export OPENSSL_MALLOC_FD ...app invocation... 3>/tmp/log$$
RETURN VALUES
NOTESWhile it's permitted to swap out only a few and not all the functions
with
COPYRIGHTCopyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html. |
:: Command execute :: | |
--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.1006 ]-- |