diff --git a/docs/functions/core/memory/why2_realloc.md b/docs/functions/core/memory/why2_realloc.md new file mode 100644 index 0000000..03f8e36 --- /dev/null +++ b/docs/functions/core/memory/why2_realloc.md @@ -0,0 +1,38 @@ + + +# why2_realloc + +## Parameters + +| Identifier | Data type | +| ---------- | --------------- | +| `pointer` | `void *` | +| `size` | `unsigned long` | + +## Attributes + +| | | +| ------------------ | ---------------------------------------------- | +| **Return type** | `void *` | +| **Header comment** | `THIS DOESN'T PRESERVE CONTENT OF pointer!` | +| **Added in commit** | [`8af6bd45c38e780bb14d99aee0a572b028c186b6`](https://github.com/ENGO150/WHY2/commit/8af6bd45c38e780bb14d99aee0a572b028c186b6) | + +## Description + +Function deallocates `pointer` (only applicable if `pointer` was allocated using WHY2-memory), passes `size` into [`malloc`](https://linux.die.net/man/3/malloc) function and returns the output value. The value is also pushed to [`linked-list`](../../../../types/core/llist/why2_list_t) for garbage collector. \ No newline at end of file diff --git a/docs/functions/index.md b/docs/functions/index.md index 87ce088..e0596d5 100644 --- a/docs/functions/index.md +++ b/docs/functions/index.md @@ -87,10 +87,11 @@ You can find documentation for every *public* function of WHY2 below. ### Memory -| Function | Description | -| ------------------------------------------ | ---------------------------------------------- | -| [`why2_malloc`](./core/memory/why2_malloc) | *This functions doesn't have any description.* | -| [`why2_calloc`](./core/memory/why2_calloc) | *This functions doesn't have any description.* | +| Function | Description | +| -------------------------------------------- | ---------------------------------------------- | +| [`why2_malloc`](./core/memory/why2_malloc) | *This functions doesn't have any description.* | +| [`why2_calloc`](./core/memory/why2_calloc) | *This functions doesn't have any description.* | +| [`why2_realloc`](./core/memory/why2_realloc) | This doesn't preserve content of pointer! | ## Logger