From d438578f6e9ca00c21092eb5cbc3cc6b7c9fb76e Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 25 Jan 2025 21:20:49 +0100 Subject: [PATCH] created doc for why2_clean_memory --- .../core/memory/why2_clean_memory.md | 39 +++++++++++++++++++ docs/functions/index.md | 23 +++++------ 2 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 docs/functions/core/memory/why2_clean_memory.md diff --git a/docs/functions/core/memory/why2_clean_memory.md b/docs/functions/core/memory/why2_clean_memory.md new file mode 100644 index 0000000..55aba1f --- /dev/null +++ b/docs/functions/core/memory/why2_clean_memory.md @@ -0,0 +1,39 @@ + + +# why2_clean_memory + +## Parameters + +| Identifier | Data type | +| ------------ | --------- | +| `identifier` | `char *` | + +## Attributes + +| | | +| ------------------ | ---------------------------------------------- | +| **Return type** | `void` | +| **Header comment** | `identifier SPECIFIES WHICH NODES TO DEALLOCATE | THIS IS BASICALLY GARBAGE COLLECTOR | PASS why2_get_default_memory_identifier() FOR DEALLOCATING EVERYTHING` | +| **Added in commit** | [`abbd82077821c3b06720212ca89f5d9438500a48`](https://github.com/ENGO150/WHY2/commit/abbd82077821c3b06720212ca89f5d9438500a48) | + +## Description + +This is basically a garbage collector. + +Function [deallocates](../why2_deallocate) all memory allocated with WHY2-memory, with ID `identifier`. You can pass `why2_get_default_memory_identifier()` as `identifier` to deallocate all memory. \ No newline at end of file diff --git a/docs/functions/index.md b/docs/functions/index.md index 88c3696..276cbb6 100644 --- a/docs/functions/index.md +++ b/docs/functions/index.md @@ -87,17 +87,18 @@ 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! | -| [`why2_recalloc`](./core/memory/why2_recalloc) | Same as why2_realloc but fills the pointer with null-terms | -| [`why2_strdup`](./core/memory/why2_strdup) | *This functions doesn't have any description.* | -| [`why2_fopen`](./core/memory/why2_fopen) | *This functions doesn't have any description.* | -| [`why2_fdopen`](./core/memory/why2_fdopen) | *This functions doesn't have any description.* | -| [`why2_opendir`](./core/memory/why2_opendir) | *This functions doesn't have any description.* | -| [`why2_deallocate`](./core/memory/why2_deallocate) | *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! | +| [`why2_recalloc`](./core/memory/why2_recalloc) | Same as why2_realloc but fills the pointer with null-terms | +| [`why2_strdup`](./core/memory/why2_strdup) | *This functions doesn't have any description.* | +| [`why2_fopen`](./core/memory/why2_fopen) | *This functions doesn't have any description.* | +| [`why2_fdopen`](./core/memory/why2_fdopen) | *This functions doesn't have any description.* | +| [`why2_opendir`](./core/memory/why2_opendir) | *This functions doesn't have any description.* | +| [`why2_deallocate`](./core/memory/why2_deallocate) | *This functions doesn't have any description.* | +| [`why2_clean_memory`](./core/memory/why2_clean_memory) | identifier specifies which nodes to deallocate \| this is basically garbage collector \| pass why2_get_default_memory_identifier() for deallocating everything | ## Logger