Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b4ec7a5f
Commit
b4ec7a5f
authored
Sep 01, 2013
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mem: Document the av_realloc family of functions properly
realloc() does not accept pointers from memalign().
parent
7f9e893f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
mem.h
libavutil/mem.h
+9
-3
No files found.
libavutil/mem.h
View file @
b4ec7a5f
...
...
@@ -101,8 +101,10 @@ av_alloc_size(1, 2) static inline void *av_malloc_array(size_t nmemb, size_t siz
* Allocate or reallocate a block of memory.
* If ptr is NULL and size > 0, allocate a new block. If
* size is zero, free the memory block pointed to by ptr.
* @note Pointers provided by av_malloc family of functions cannot be
* passed to av_realloc().
* @param ptr Pointer to a memory block already allocated with
* av_
malloc(z)() or av_
realloc() or NULL.
* av_realloc() or NULL.
* @param size Size in bytes for the memory block to be allocated or
* reallocated.
* @return Pointer to a newly reallocated block or NULL if the block
...
...
@@ -115,8 +117,10 @@ void *av_realloc(void *ptr, size_t size) av_alloc_size(2);
* Allocate or reallocate an array.
* If ptr is NULL and nmemb > 0, allocate a new block. If
* nmemb is zero, free the memory block pointed to by ptr.
* @note Pointers provided by av_malloc family of functions cannot be
* passed to av_realloc_array().
* @param ptr Pointer to a memory block already allocated with
* av_
malloc(z)() or av_
realloc() or NULL.
* av_realloc() or NULL.
* @param nmemb Number of elements
* @param size Size of the single element
* @return Pointer to a newly reallocated block or NULL if the block
...
...
@@ -128,8 +132,10 @@ av_alloc_size(2, 3) void *av_realloc_array(void *ptr, size_t nmemb, size_t size)
* Allocate or reallocate an array.
* If *ptr is NULL and nmemb > 0, allocate a new block. If
* nmemb is zero, free the memory block pointed to by ptr.
* @note Pointers provided by av_malloc family of functions cannot be
* passed to av_reallocp_array().
* @param ptr Pointer to a pointer to a memory block already allocated
* with av_
malloc(z)() or av_
realloc(), or pointer to a pointer to NULL.
* with av_realloc(), or pointer to a pointer to NULL.
* The pointer is updated on success, or freed on failure.
* @param nmemb Number of elements
* @param size Size of the single element
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment