Skip to content

Commit

Permalink
explain that NumElements in alloca and malloc defaults to one
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46912 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
ggreif committed Feb 9, 2008
1 parent b3c4eb4 commit 1acd2ee
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/LangRef.html
Original file line number Diff line number Diff line change
Expand Up @@ -2760,10 +2760,10 @@ <h5>Arguments:</h5>
<tt>sizeof(&lt;type&gt;)*NumElements</tt>
bytes of memory from the operating system and returns a pointer of the
appropriate type to the program. If "NumElements" is specified, it is the
number of elements allocated. If an alignment is specified, the value result
of the allocation is guaranteed to be aligned to at least that boundary. If
not specified, or if zero, the target can choose to align the allocation on any
convenient boundary.</p>
number of elements allocated, otherwise "NumElements" is defaulted to be one.
If an alignment is specified, the value result of the allocation is guaranteed to
be aligned to at least that boundary. If not specified, or if zero, the target can
choose to align the allocation on any convenient boundary.</p>

<p>'<tt>type</tt>' must be a sized type.</p>

Expand Down Expand Up @@ -2846,11 +2846,11 @@ <h5>Arguments:</h5>

<p>The '<tt>alloca</tt>' instruction allocates <tt>sizeof(&lt;type&gt;)*NumElements</tt>
bytes of memory on the runtime stack, returning a pointer of the
appropriate type to the program. If "NumElements" is specified, it is the
number of elements allocated. If an alignment is specified, the value result
of the allocation is guaranteed to be aligned to at least that boundary. If
not specified, or if zero, the target can choose to align the allocation on any
convenient boundary.</p>
appropriate type to the program. If "NumElements" is specified, it is the
number of elements allocated, otherwise "NumElements" is defaulted to be one.
If an alignment is specified, the value result of the allocation is guaranteed
to be aligned to at least that boundary. If not specified, or if zero, the target
can choose to align the allocation on any convenient boundary.</p>

<p>'<tt>type</tt>' may be any sized type.</p>

Expand Down

0 comments on commit 1acd2ee

Please sign in to comment.