From 87d1c2b79c4f65978e51fa998fa018f4ed2843fc Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Sat, 25 Jan 2025 17:02:16 +0100 Subject: [PATCH] created doc for why2_get_memory_identifier --- .../getters/why2_get_memory_identifier.md | 37 +++++++++++++++++++ docs/functions/index.md | 1 + 2 files changed, 38 insertions(+) create mode 100644 docs/functions/core/flags/getters/why2_get_memory_identifier.md diff --git a/docs/functions/core/flags/getters/why2_get_memory_identifier.md b/docs/functions/core/flags/getters/why2_get_memory_identifier.md new file mode 100644 index 0000000..1577f4a --- /dev/null +++ b/docs/functions/core/flags/getters/why2_get_memory_identifier.md @@ -0,0 +1,37 @@ + + +# why2_get_memory_identifier + +## Parameters + +*This functions doesn't take any parameters.* + +## Attributes + +| | | +| ------------------ | ---------------------------------------------- | +| **Return type** | `char *` | +| **Header comment** | `RETURNS STRING USED IN LINKED LIST (IN memory.c) FOR IDENTIFYING NODES WHEN RUNNING GARBAGE COLLECTOR` | +| **Added in commit** | [`70335e67ad3e7ef3bc693741a03cb91962b91863`](https://github.com/ENGO150/WHY2/commit/70335e67ad3e7ef3bc693741a03cb91962b91863) | + +## Description + +Returns string, which is used in garbage collector for identifying (separating) nodes. + +Every allocation has its own ID, which is set to lastly used `memory_identifier`. This separates allocations in code to blocks and you can run GC with the `memory_identifier` to deallocate those blocks. \ No newline at end of file diff --git a/docs/functions/index.md b/docs/functions/index.md index 6f81670..0c8a113 100644 --- a/docs/functions/index.md +++ b/docs/functions/index.md @@ -57,6 +57,7 @@ You can find documentation for every *public* function of WHY2 below. | [`why2_get_encryption_operation`](./core/flags/getters/why2_get_encryption_operation) | Returns functions which is used for encryption & decryption | | [`why2_get_flags_changed`](./core/flags/getters/why2_get_flags_changed) | *This functions doesn't have any description.* | | [`why2_get_padding_changed`](./core/flags/getters/why2_get_padding_changed) | *This functions doesn't have any description.* | +| [`why2_get_memory_identifier`](./core/flags/getters/why2_get_memory_identifier) | Returns string used in linked list (in memory.c) for identifying nodes when running garbage collector | ## Logger