@geastack/host 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -169,6 +169,10 @@ class VideoPixels {
169
169
  void* result = nullptr;
170
170
  if (posix_memalign(&result, 16, (bytes + 15) & ~std::size_t(15)) != 0) return nullptr;
171
171
  return static_cast<std::uint16_t*>(result);
172
+ #elif defined(_WIN32)
173
+ // The MSVC CRT has no aligned_alloc: its aligned blocks come from
174
+ // _aligned_malloc and must go back through _aligned_free (see release).
175
+ return static_cast<std::uint16_t*>(_aligned_malloc((bytes + 15) & ~std::size_t(15), 16));
172
176
  #else
173
177
  return static_cast<std::uint16_t*>(::aligned_alloc(16, (bytes + 15) & ~std::size_t(15)));
174
178
  #endif
@@ -177,6 +181,8 @@ class VideoPixels {
177
181
  static void release(std::uint16_t* pointer) noexcept {
178
182
  #ifdef ESP_PLATFORM
179
183
  heap_caps_free(pointer);
184
+ #elif defined(_WIN32)
185
+ _aligned_free(pointer);
180
186
  #else
181
187
  std::free(pointer);
182
188
  #endif
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/host",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "GeaStack host bindings and platform service sources.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {