Skip to content

Commit

Permalink
feat: 0.4.4 Add option to block usage with an active temp session, dr…
Browse files Browse the repository at this point in the history
…op list template, --enable-locate (#77)

* chore: move list template to new file

* feat: push calls return NULL when has_temp==1 and conf wants to

* chore: rename __KLS_STRCPY() to avoid using __ namespacing

* feat: collect common parts for push ops

* feat: add enable-locate

* chore: update bad_size test

* feat: include profileapi.h instead of whole windows.h

* chore: drop intrusive mention from readme

* chore: bump invil to 0.2.15

* chore: update stego.lock

* chore: bump version

* chore: bump anvil version in stego.lock to 2.0.6
  • Loading branch information
jgabaut authored Aug 8, 2024
1 parent c777489 commit 4d80df6
Show file tree
Hide file tree
Showing 12 changed files with 1,046 additions and 1,115 deletions.
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ AM_LDFLAGS = -O2
# Compiler flags
AM_CFLAGS = $(KOLISEO_CFLAGS) -O2 -Werror -Wpedantic -Wall --std=c11

if LOCATE_BUILD
AM_CFLAGS += -DKOLISEO_HAS_LOCATE
endif

if DEBUG_BUILD
AM_LDFLAGS += -ggdb -O0
AM_CFLAGS += -DKLS_DEBUG_CORE -DKLS_SETCONF_DEBUG
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## What is this thing? <a name = "witt"></a>

This is a C library for an arena allocator, whose arenas are named `Koliseo`.
It offers a basic API to perform initalisation, push (request arena memory), reset and free of a `Koliseo`.
It offers a basic API to perform initialisation, push (request arena memory), reset and free of a `Koliseo`.

If you compile it without defining any special macros, you will get the basic functionality.

Expand Down Expand Up @@ -98,7 +98,7 @@ int main(void)
### Region <a name = "extra_region"></a>

A ready-to-go index for every allocation you make.
- It uses an intrusive linked list and (at the moment) has quite the memory overhead, due to hosting a couple static string buffers for the tags, so it may not be suited for all usecases.
- It uses a linked list and has some the memory overhead, due to hosting a couple static string buffers for the tags, so it may not be suited for all usecases.
- Offers extended API with tagging arguments, to type/name your references
- For now, two allocations backends can be chosen for the list, it can be stored:
- In an inner Koliseo (this puts an extra limit to the total number of single allocations)
Expand All @@ -121,10 +121,10 @@ int main(void)

### List template <a name = "list_template"></a>

Any time `LIST_T` is defined before including `koliseo.h`, a basic linked-list implementation supporting `Koliseo` allocation will be declared for the passed type.
Any time `LIST_T` is defined before including `templates/list.h`, a basic linked-list implementation supporting `Koliseo` allocation will be declared for the passed type.
- It can be done also after building a static object for the library.

The `LIST_T` macro and the `koliseo.h` should be repeatable without issues, allowing definition of more than one list interface.
The `LIST_T` macro and the `templates/list.h` should be repeatable without issues, allowing definition of more than one list interface.

This is implemented using some code-generating macros, which could rended build time slower if overused.

Expand Down
9 changes: 7 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Define the package name and version
AC_INIT([koliseo], [0.4.3], [[email protected]])
AC_INIT([koliseo], [0.4.4], [[email protected]])

# Verify automake version and enable foreign option
AM_INIT_AUTOMAKE([foreign -Wall])
Expand All @@ -11,6 +11,10 @@ build_windows=no
build_mac=no
echo "Host os: $host_os"

AC_ARG_ENABLE([locate],
[AS_HELP_STRING([--enable-locate], [Enable location signatures])],
[enable_locate=$enableval],
[enable_locate=no])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug], [Enable debug build])],
[enable_debug=$enableval],
Expand All @@ -35,6 +39,7 @@ AC_ARG_ENABLE([exper],
[AS_HELP_STRING([--enable-exper], [Enable experimental features])],
[enable_exper=$enableval],
[enable_exper=no])
AM_CONDITIONAL([LOCATE_BUILD], [test "$enable_locate" = "yes"])
AM_CONDITIONAL([DEBUG_BUILD], [test "$enable_debug" = "yes"])
AM_CONDITIONAL([CURSES_BUILD], [test "$enable_curses" = "yes"])
AM_CONDITIONAL([GULP_BUILD], [test "$enable_gulp" = "yes"])
Expand Down Expand Up @@ -104,7 +109,7 @@ AM_CONDITIONAL([LINUX_BUILD], [test "$build_linux" = "yes"])
# Set a default version number if not specified externally
AC_ARG_VAR([VERSION], [Version number])
if test -z "$VERSION"; then
VERSION="0.4.3"
VERSION="0.4.4"
fi

# Output variables to the config.h header
Expand Down
2 changes: 1 addition & 1 deletion docs/koliseo.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = koliseo
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.4.3
PROJECT_NUMBER = 0.4.4

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion invil
Loading

0 comments on commit 4d80df6

Please sign in to comment.