Skip to content

Commit 46bcc45

Browse files
authored
Merge pull request KhronosGroup#923 from gmlueck/gmlueck/cherry-pick-649
Improve default allocator wording
2 parents c8e1218 + fe7e094 commit 46bcc45

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

adoc/chapters/programming_interface.adoc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5137,11 +5137,9 @@ can supply their own allocator class.
51375137
}
51385138
----
51395139

5140-
When an allocator returns a [code]#nullptr#, the runtime cannot allocate data on
5141-
the host.
5142-
Note that in this case the runtime will raise an error if it requires host
5143-
memory but it is not available (e.g when moving data across <<backend>>
5144-
contexts).
5140+
Note that if the runtime requires host memory (e.g., when moving data across
5141+
<<backend>> contexts), but the allocator fails to allocate the memory, then the
5142+
runtime will raise an error.
51455143

51465144
In some cases, the implementation may retain a copy of the allocator object even
51475145
after the buffer is destroyed.
@@ -5166,8 +5164,6 @@ STL-based libraries (e.g, Intel's TBB provides an allocator).
51665164
==== Default allocators
51675165

51685166
A default allocator is always defined by the implementation.
5169-
For allocations greater than size zero, when successful it is guaranteed to
5170-
return non-[code]#nullptr# and new memory positions every call.
51715167
The default allocator for const buffers will remove the const-ness of the type
51725168
(therefore, the default allocator for a buffer of type [code]#const int# will be
51735169
an [code]#Allocator<int>)#.

0 commit comments

Comments
 (0)