diff --git a/docs/functions/core/memory/why2_recalloc.md b/docs/functions/core/memory/why2_recalloc.md new file mode 100644 index 0000000..f99b582 --- /dev/null +++ b/docs/functions/core/memory/why2_recalloc.md @@ -0,0 +1,39 @@ + + +# why2_recalloc + +## Parameters + +| Identifier | Data type | +| ------------ | --------------- | +| `pointer` | `void *` | +| `size` | `unsigned long` | +| `block_size` | `unsigned long` | + +## Attributes + +| | | +| ------------------ | ------------------------------------------------------------ | +| **Return type** | `void *` | +| **Header comment** | `SAME AS why2_realloc BUT FILLS THE pointer WITH NULL-TERMS` | +| **Added in commit** | [`c5394e63e50e7c2e018a4323d33821c4f4e14884`](https://github.com/ENGO150/WHY2/commit/c5394e63e50e7c2e018a4323d33821c4f4e14884) | + +## Description + +Function deallocates `pointer` (only applicable if `pointer` was allocated using WHY2-memory), passes `size` and `block_size` into [`calloc`](https://linux.die.net/man/3/calloc) 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 e0596d5..5b1fa5d 100644 --- a/docs/functions/index.md +++ b/docs/functions/index.md @@ -87,11 +87,12 @@ 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.* | -| [`why2_realloc`](./core/memory/why2_realloc) | This doesn't preserve content of pointer! | +| 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! | +| [`why2_recalloc`](./core/memory/why2_recalloc) | Same as why2_realloc but fills the pointer with null-terms | ## Logger