diff --git a/modules/src/kc_env.c b/modules/src/kc_env.c index cb0965a..11ec100 100644 --- a/modules/src/kc_env.c +++ b/modules/src/kc_env.c @@ -11,7 +11,7 @@ #include // Windows 環境変数の最大長は 327676 -#define KC_ENV_BUFFER_MAX (32767) +#define KC_ENV_BUFFER_MAX (4096) /** * 指定された環境変数の値を取得します。 diff --git a/modules/src/kc_env.c b/modules/src/kc_env.c index cb0965a..11ec100 100644 --- a/modules/src/kc_env.c +++ b/modules/src/kc_env.c @@ -11,7 +11,7 @@ #include // Windows 環境変数の最大長は 327676 -#define KC_ENV_BUFFER_MAX (32767) +#define KC_ENV_BUFFER_MAX (4096) /** * 指定された環境変数の値を取得します。 diff --git a/modules/src/kc_memory_entry.c b/modules/src/kc_memory_entry.c index 78139a8..a8e6fb3 100644 --- a/modules/src/kc_memory_entry.c +++ b/modules/src/kc_memory_entry.c @@ -13,6 +13,10 @@ #undef KC_MEMORY_ENABLED #endif +#if !(KC_IS_WINDOWS) +#define _aligned_free(ptr) raw_free(ptr) +#endif + //////////////////////////////////////////////////////////////////////////////// // // 定数定義 @@ -78,7 +82,7 @@ */ void KcMemoryEntry_delete(KcMemoryEntry *entry) { - if (KC_IS_WINDOWS && (entry->mark == KC_MEMORY_ALLOCATED_ALIGNED)) + if (entry->mark == KC_MEMORY_ALLOCATED_ALIGNED) { entry->mark = KC_MEMORY_DELETED; entry->size = 0; diff --git a/modules/src/kc_env.c b/modules/src/kc_env.c index cb0965a..11ec100 100644 --- a/modules/src/kc_env.c +++ b/modules/src/kc_env.c @@ -11,7 +11,7 @@ #include // Windows 環境変数の最大長は 327676 -#define KC_ENV_BUFFER_MAX (32767) +#define KC_ENV_BUFFER_MAX (4096) /** * 指定された環境変数の値を取得します。 diff --git a/modules/src/kc_memory_entry.c b/modules/src/kc_memory_entry.c index 78139a8..a8e6fb3 100644 --- a/modules/src/kc_memory_entry.c +++ b/modules/src/kc_memory_entry.c @@ -13,6 +13,10 @@ #undef KC_MEMORY_ENABLED #endif +#if !(KC_IS_WINDOWS) +#define _aligned_free(ptr) raw_free(ptr) +#endif + //////////////////////////////////////////////////////////////////////////////// // // 定数定義 @@ -78,7 +82,7 @@ */ void KcMemoryEntry_delete(KcMemoryEntry *entry) { - if (KC_IS_WINDOWS && (entry->mark == KC_MEMORY_ALLOCATED_ALIGNED)) + if (entry->mark == KC_MEMORY_ALLOCATED_ALIGNED) { entry->mark = KC_MEMORY_DELETED; entry->size = 0; diff --git a/modules/test/Makefile b/modules/test/Makefile index 37f67b2..9565fe9 100644 --- a/modules/test/Makefile +++ b/modules/test/Makefile @@ -11,7 +11,7 @@ TOPDIR ?= ../.. RULEDIR ?= $(TOPDIR)/mk NAME = ut -TARGET = $(NAME) +TARGET = $(NAME).exe SUBDIRS = USE_SO_VERSION = diff --git a/modules/src/kc_env.c b/modules/src/kc_env.c index cb0965a..11ec100 100644 --- a/modules/src/kc_env.c +++ b/modules/src/kc_env.c @@ -11,7 +11,7 @@ #include // Windows 環境変数の最大長は 327676 -#define KC_ENV_BUFFER_MAX (32767) +#define KC_ENV_BUFFER_MAX (4096) /** * 指定された環境変数の値を取得します。 diff --git a/modules/src/kc_memory_entry.c b/modules/src/kc_memory_entry.c index 78139a8..a8e6fb3 100644 --- a/modules/src/kc_memory_entry.c +++ b/modules/src/kc_memory_entry.c @@ -13,6 +13,10 @@ #undef KC_MEMORY_ENABLED #endif +#if !(KC_IS_WINDOWS) +#define _aligned_free(ptr) raw_free(ptr) +#endif + //////////////////////////////////////////////////////////////////////////////// // // 定数定義 @@ -78,7 +82,7 @@ */ void KcMemoryEntry_delete(KcMemoryEntry *entry) { - if (KC_IS_WINDOWS && (entry->mark == KC_MEMORY_ALLOCATED_ALIGNED)) + if (entry->mark == KC_MEMORY_ALLOCATED_ALIGNED) { entry->mark = KC_MEMORY_DELETED; entry->size = 0; diff --git a/modules/test/Makefile b/modules/test/Makefile index 37f67b2..9565fe9 100644 --- a/modules/test/Makefile +++ b/modules/test/Makefile @@ -11,7 +11,7 @@ TOPDIR ?= ../.. RULEDIR ?= $(TOPDIR)/mk NAME = ut -TARGET = $(NAME) +TARGET = $(NAME).exe SUBDIRS = USE_SO_VERSION = diff --git a/modules/test/src/test_memory_mark.c b/modules/test/src/test_memory_mark.c index dcfcf61..28f67db 100644 --- a/modules/test/src/test_memory_mark.c +++ b/modules/test/src/test_memory_mark.c @@ -32,6 +32,9 @@ { const char *res = KcMemoryMark_to_string(KC_MEMORY_ALLOCATED); assert_equals("alloc ", res); + + res = KcMemoryMark_to_string(KC_MEMORY_ALLOCATED_ALIGNED); + assert_equals("alloca", res); } /**