Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
32601bab
Commit
32601bab
authored
Mar 02, 2007
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugs #1668032, #1668036, #1669304: clarify behavior of PyMem_Realloc and _Resize.
(backport from rev. 54088)
parent
7c636521
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Doc/api/memory.tex
Doc/api/memory.tex
+5
-2
No files found.
Doc/api/memory.tex
View file @
32601bab
...
...
@@ -100,7 +100,9 @@ are available for allocating and releasing memory from the Python heap:
memory block is resized but is not freed, and the returned pointer
is non-
\NULL
. Unless
\var
{
p
}
is
\NULL
, it must have been
returned by a previous call to
\cfunction
{
PyMem
_
Malloc()
}
or
\cfunction
{
PyMem
_
Realloc()
}
.
\cfunction
{
PyMem
_
Realloc()
}
. If the request fails,
\cfunction
{
PyMem
_
Realloc()
}
returns
\NULL
{}
and
\var
{
p
}
remains a
valid pointer to the previous memory area.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyMem
_
Free
}{
void *p
}
...
...
@@ -124,7 +126,8 @@ that \var{TYPE} refers to any C type.
\begin{cfuncdesc}
{
\var
{
TYPE
}
*
}{
PyMem
_
Resize
}{
void *p, TYPE, size
_
t n
}
Same as
\cfunction
{
PyMem
_
Realloc()
}
, but the memory block is resized
to
\code
{
(
\var
{
n
}
* sizeof(
\var
{
TYPE
}
))
}
bytes. Returns a pointer
cast to
\ctype
{
\var
{
TYPE
}
*
}
.
cast to
\ctype
{
\var
{
TYPE
}
*
}
. On return,
\var
{
p
}
will be a pointer to
the new memory area, or
\NULL
{}
in the event of failure.
\end{cfuncdesc}
\begin{cfuncdesc}
{
void
}{
PyMem
_
Del
}{
void *p
}
...
...
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