From Jason Turner

[c.malloc]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmplu7x9_2l/{from.md → to.md} +0 -16
tmp/tmplu7x9_2l/{from.md → to.md} RENAMED
@@ -14,26 +14,10 @@ void* realloc(void* ptr, size_t size);
14
  standard library.
15
 
16
  *Remarks:* These functions do not attempt to allocate storage by calling
17
  `::operator new()` [[new.delete]].
18
 
19
- Storage allocated directly with these functions is implicitly declared
20
- reachable (see  [[basic.stc.dynamic.safety]]) on allocation, ceases to
21
- be declared reachable on deallocation, and need not cease to be declared
22
- reachable as the result of an `undeclare_reachable()` call.
23
-
24
- [*Note 1*: This allows existing C libraries to remain unaffected by
25
- restrictions on pointers that are not safely derived, at the expense of
26
- providing far fewer garbage collection and leak detection options for
27
- `malloc()`-allocated objects. It also allows `malloc()` to be
28
- implemented with a separate allocation arena, bypassing the normal
29
- `declare_reachable()` implementation. The above functions should never
30
- intentionally be used as a replacement for `declare_reachable()`, and
31
- newly written code is strongly encouraged to treat memory allocated with
32
- these functions as though it were allocated with
33
- `operator new`. — *end note*]
34
-
35
  These functions implicitly create objects [[intro.object]] in the
36
  returned region of storage and return a pointer to a suitable created
37
  object. In the case of `calloc` and `realloc`, the objects are created
38
  before the storage is zeroed or copied, respectively.
39
 
 
14
  standard library.
15
 
16
  *Remarks:* These functions do not attempt to allocate storage by calling
17
  `::operator new()` [[new.delete]].
18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  These functions implicitly create objects [[intro.object]] in the
20
  returned region of storage and return a pointer to a suitable created
21
  object. In the case of `calloc` and `realloc`, the objects are created
22
  before the storage is zeroed or copied, respectively.
23