koffi 2.1.0-beta.3 → 2.1.0
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.
- package/ChangeLog.md +2 -1
- package/build/qemu/2.1.0/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0/koffi_win32_x64.tar.gz +0 -0
- package/doc/benchmarks.md +14 -14
- package/doc/benchmarks.xlsx +0 -0
- package/doc/index.rst +2 -2
- package/doc/static/perf_linux_20220812.png +0 -0
- package/doc/static/perf_windows_20220812.png +0 -0
- package/doc/types.md +10 -12
- package/package.json +2 -2
- package/qemu/registry/machines.json +2 -2
- package/qemu/registry/sha256sum.txt +2 -2
- package/src/abi_arm32.cc +23 -55
- package/src/abi_arm64.cc +22 -54
- package/src/abi_riscv64.cc +20 -52
- package/src/abi_x64_sysv.cc +20 -52
- package/src/abi_x64_win.cc +20 -52
- package/src/abi_x86.cc +24 -56
- package/src/call.cc +117 -143
- package/src/call.hh +4 -4
- package/src/ffi.cc +16 -4
- package/src/util.hh +0 -20
- package/test/callbacks.js +3 -3
- package/test/misc.c +2 -2
- package/test/sync.js +2 -2
- package/vendor/libcc/libcc.cc +75 -55
- package/vendor/libcc/libcc.hh +306 -255
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj +226 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.filters +10 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android/raylib_android.NativeActivity/raylib_android.NativeActivity.vcxproj.user +4 -0
- package/vendor/raylib/projects/VS2019-Android/raylib_android.sln +75 -0
- package/vendor/raylib/projects/VS2022/examples/audio_module_playing.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/audio_multichannel_sound.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/audio_music_stream.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/audio_raw_stream.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/audio_sound_loading.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/audio_stream_effects.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_2d_camera.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_2d_camera_mouse_zoom.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_2d_camera_platformer.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_3d_camera_first_person.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_3d_camera_free.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_3d_camera_mode.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_3d_picking.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_basic_screen_manager.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_basic_window.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_custom_frame_control.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_custom_logging.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_drop_files.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_input_gamepad.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_input_gestures.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_input_keys.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_input_mouse.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_input_mouse_wheel.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_input_multitouch.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_loading_thread.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_random_values.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_scissor_test.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_split_screen.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_storage_values.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_vr_simulator.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_window_flags.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_window_letterbox.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/core_window_should_close.vcxproj +390 -0
- package/vendor/raylib/projects/VS2022/examples/core_world_screen.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/easings_testbed.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/embedded_files_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_animation.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_billboard.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_box_collisions.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_cubicmap.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_first_person_maze.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_geometric_shapes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_heightmap.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_loading_gltf.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_loading_vox.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_mesh_generation.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_mesh_picking.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_orthographic_projection.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_rlgl_solar_system.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_skybox.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_waving_cubes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/models_yaw_pitch_roll.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/rlgl_compute_shaders.vcxproj +391 -0
- package/vendor/raylib/projects/VS2022/examples/rlgl_standalone.vcxproj +391 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_basic_lighting.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_custom_uniform.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_eratosthenes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_fog.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_hot_reloading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_julia_set.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_mesh_instancing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_model_shader.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_multi_sample2d.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_palette_switch.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_postprocessing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_raymarching.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_shapes_textures.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_simple_mask.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_spotlight.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_texture_drawing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shaders_texture_waves.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_basic_shapes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_bouncing_ball.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_collision_area.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_colors_palette.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_draw_circle_sector.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_draw_rectangle_rounded.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_draw_ring.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_easings_ball_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_easings_box_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_easings_rectangle_array.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_following_eyes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_lines_bezier.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_logo_raylib.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_logo_raylib_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/shapes_rectangle_scaling.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_codepoints_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_draw_3d.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_font_filters.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_font_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_font_sdf.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_font_spritefont.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_format_text.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_input_box.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_raylib_fonts.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_rectangle_bounds.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_unicode.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/text_writing_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_background_scrolling.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_blend_modes.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_bunnymark.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_draw_tiled.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_fog_of_war.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_gif_player.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_image_drawing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_image_generation.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_image_loading.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_image_processing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_image_text.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_logo_raylib.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_mouse_painting.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_npatch_drawing.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_particles_blending.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_polygon.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_raw_data.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_sprite_anim.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_sprite_button.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_sprite_explosion.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_srcrec_dstrec.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/examples/textures_to_image.vcxproj +387 -0
- package/vendor/raylib/projects/VS2022/raylib/raylib.vcxproj +340 -0
- package/vendor/raylib/projects/VS2022/raylib.sln +2347 -0
- package/build/qemu/2.1.0-beta.3/koffi_darwin_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_darwin_x64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_freebsd_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_freebsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_freebsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_linux_arm32hf.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_linux_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_linux_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_linux_riscv64hf64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_linux_x64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_openbsd_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_openbsd_x64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_win32_arm64.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_win32_ia32.tar.gz +0 -0
- package/build/qemu/2.1.0-beta.3/koffi_win32_x64.tar.gz +0 -0
- package/doc/dist/doctrees/benchmarks.doctree +0 -0
- package/doc/dist/doctrees/changes.doctree +0 -0
- package/doc/dist/doctrees/contribute.doctree +0 -0
- package/doc/dist/doctrees/environment.pickle +0 -0
- package/doc/dist/doctrees/functions.doctree +0 -0
- package/doc/dist/doctrees/index.doctree +0 -0
- package/doc/dist/doctrees/memory.doctree +0 -0
- package/doc/dist/doctrees/platforms.doctree +0 -0
- package/doc/dist/doctrees/start.doctree +0 -0
- package/doc/dist/doctrees/types.doctree +0 -0
- package/doc/dist/html/.buildinfo +0 -4
- package/doc/dist/html/_sources/benchmarks.md.txt +0 -137
- package/doc/dist/html/_sources/changes.md.txt +0 -161
- package/doc/dist/html/_sources/contribute.md.txt +0 -127
- package/doc/dist/html/_sources/functions.md.txt +0 -421
- package/doc/dist/html/_sources/index.rst.txt +0 -39
- package/doc/dist/html/_sources/memory.md.txt +0 -32
- package/doc/dist/html/_sources/platforms.md.txt +0 -31
- package/doc/dist/html/_sources/start.md.txt +0 -100
- package/doc/dist/html/_sources/types.md.txt +0 -541
- package/doc/dist/html/_static/_sphinx_javascript_frameworks_compat.js +0 -134
- package/doc/dist/html/_static/basic.css +0 -932
- package/doc/dist/html/_static/bench_linux.png +0 -0
- package/doc/dist/html/_static/bench_windows.png +0 -0
- package/doc/dist/html/_static/custom.css +0 -22
- package/doc/dist/html/_static/debug.css +0 -69
- package/doc/dist/html/_static/doctools.js +0 -264
- package/doc/dist/html/_static/documentation_options.js +0 -14
- package/doc/dist/html/_static/file.png +0 -0
- package/doc/dist/html/_static/jquery-3.6.0.js +0 -10881
- package/doc/dist/html/_static/jquery.js +0 -2
- package/doc/dist/html/_static/language_data.js +0 -199
- package/doc/dist/html/_static/minus.png +0 -0
- package/doc/dist/html/_static/perf_linux_20220623.png +0 -0
- package/doc/dist/html/_static/perf_linux_20220623_2.png +0 -0
- package/doc/dist/html/_static/perf_linux_20220627.png +0 -0
- package/doc/dist/html/_static/perf_linux_20220628.png +0 -0
- package/doc/dist/html/_static/perf_windows_20220623.png +0 -0
- package/doc/dist/html/_static/perf_windows_20220623_2.png +0 -0
- package/doc/dist/html/_static/perf_windows_20220627.png +0 -0
- package/doc/dist/html/_static/perf_windows_20220628.png +0 -0
- package/doc/dist/html/_static/plus.png +0 -0
- package/doc/dist/html/_static/pygments.css +0 -252
- package/doc/dist/html/_static/scripts/furo-extensions.js +0 -0
- package/doc/dist/html/_static/scripts/furo.js +0 -3
- package/doc/dist/html/_static/scripts/furo.js.LICENSE.txt +0 -7
- package/doc/dist/html/_static/scripts/furo.js.map +0 -1
- package/doc/dist/html/_static/searchtools.js +0 -531
- package/doc/dist/html/_static/skeleton.css +0 -296
- package/doc/dist/html/_static/styles/furo-extensions.css +0 -2
- package/doc/dist/html/_static/styles/furo-extensions.css.map +0 -1
- package/doc/dist/html/_static/styles/furo.css +0 -2
- package/doc/dist/html/_static/styles/furo.css.map +0 -1
- package/doc/dist/html/_static/underscore-1.13.1.js +0 -2042
- package/doc/dist/html/_static/underscore.js +0 -6
- package/doc/dist/html/benchmarks.html +0 -571
- package/doc/dist/html/changes.html +0 -686
- package/doc/dist/html/contribute.html +0 -403
- package/doc/dist/html/functions.html +0 -718
- package/doc/dist/html/genindex.html +0 -253
- package/doc/dist/html/index.html +0 -359
- package/doc/dist/html/memory.html +0 -346
- package/doc/dist/html/objects.inv +0 -0
- package/doc/dist/html/platforms.html +0 -371
- package/doc/dist/html/search.html +0 -261
- package/doc/dist/html/searchindex.js +0 -1
- package/doc/dist/html/start.html +0 -384
- package/doc/dist/html/types.html +0 -1061
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html class="no-js" lang="en">
|
|
3
|
-
<head><meta charset="utf-8"/>
|
|
4
|
-
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
|
5
|
-
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
|
|
6
|
-
<link rel="index" title="Index" href="genindex" /><link rel="search" title="Search" href="search" /><link rel="next" title="Benchmarks" href="benchmarks" /><link rel="prev" title="Functions" href="functions" />
|
|
7
|
-
|
|
8
|
-
<meta name="generator" content="sphinx-5.0.1, furo 2022.06.04.1"/>
|
|
9
|
-
<title>Memory usage - Koffi</title>
|
|
10
|
-
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
11
|
-
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=40978830699223671f4072448e654b5958f38b89" />
|
|
12
|
-
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
|
13
|
-
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<style>
|
|
19
|
-
body {
|
|
20
|
-
--color-code-background: #f8f8f8;
|
|
21
|
-
--color-code-foreground: black;
|
|
22
|
-
--color-brand-primary: #FF6600;
|
|
23
|
-
--color-brand-content: #FF6600;
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
@media not print {
|
|
27
|
-
body[data-theme="dark"] {
|
|
28
|
-
--color-code-background: #202020;
|
|
29
|
-
--color-code-foreground: #d0d0d0;
|
|
30
|
-
--color-brand-primary: #FF6600;
|
|
31
|
-
--color-brand-content: #FF6600;
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
@media (prefers-color-scheme: dark) {
|
|
35
|
-
body:not([data-theme="light"]) {
|
|
36
|
-
--color-code-background: #202020;
|
|
37
|
-
--color-code-foreground: #d0d0d0;
|
|
38
|
-
--color-brand-primary: #FF6600;
|
|
39
|
-
--color-brand-content: #FF6600;
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
</style></head>
|
|
45
|
-
<body>
|
|
46
|
-
|
|
47
|
-
<script>
|
|
48
|
-
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
|
53
|
-
<symbol id="svg-toc" viewBox="0 0 24 24">
|
|
54
|
-
<title>Contents</title>
|
|
55
|
-
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
|
56
|
-
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
|
57
|
-
</svg>
|
|
58
|
-
</symbol>
|
|
59
|
-
<symbol id="svg-menu" viewBox="0 0 24 24">
|
|
60
|
-
<title>Menu</title>
|
|
61
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
62
|
-
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
|
63
|
-
<line x1="3" y1="12" x2="21" y2="12"></line>
|
|
64
|
-
<line x1="3" y1="6" x2="21" y2="6"></line>
|
|
65
|
-
<line x1="3" y1="18" x2="21" y2="18"></line>
|
|
66
|
-
</svg>
|
|
67
|
-
</symbol>
|
|
68
|
-
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
|
69
|
-
<title>Expand</title>
|
|
70
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
71
|
-
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
|
72
|
-
<polyline points="9 18 15 12 9 6"></polyline>
|
|
73
|
-
</svg>
|
|
74
|
-
</symbol>
|
|
75
|
-
<symbol id="svg-sun" viewBox="0 0 24 24">
|
|
76
|
-
<title>Light mode</title>
|
|
77
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
78
|
-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
|
79
|
-
<circle cx="12" cy="12" r="5"></circle>
|
|
80
|
-
<line x1="12" y1="1" x2="12" y2="3"></line>
|
|
81
|
-
<line x1="12" y1="21" x2="12" y2="23"></line>
|
|
82
|
-
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
|
83
|
-
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
|
84
|
-
<line x1="1" y1="12" x2="3" y2="12"></line>
|
|
85
|
-
<line x1="21" y1="12" x2="23" y2="12"></line>
|
|
86
|
-
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
|
87
|
-
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
|
88
|
-
</svg>
|
|
89
|
-
</symbol>
|
|
90
|
-
<symbol id="svg-moon" viewBox="0 0 24 24">
|
|
91
|
-
<title>Dark mode</title>
|
|
92
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
93
|
-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
|
94
|
-
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
95
|
-
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
|
96
|
-
</svg>
|
|
97
|
-
</symbol>
|
|
98
|
-
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
|
99
|
-
<title>Auto light/dark mode</title>
|
|
100
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
|
101
|
-
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
|
102
|
-
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
|
103
|
-
<circle cx="12" cy="12" r="9" />
|
|
104
|
-
<path d="M13 12h5" />
|
|
105
|
-
<path d="M13 15h4" />
|
|
106
|
-
<path d="M13 18h1" />
|
|
107
|
-
<path d="M13 9h4" />
|
|
108
|
-
<path d="M13 6h1" />
|
|
109
|
-
</svg>
|
|
110
|
-
</symbol>
|
|
111
|
-
</svg>
|
|
112
|
-
|
|
113
|
-
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
|
114
|
-
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
|
115
|
-
<label class="overlay sidebar-overlay" for="__navigation">
|
|
116
|
-
<div class="visually-hidden">Hide navigation sidebar</div>
|
|
117
|
-
</label>
|
|
118
|
-
<label class="overlay toc-overlay" for="__toc">
|
|
119
|
-
<div class="visually-hidden">Hide table of contents sidebar</div>
|
|
120
|
-
</label>
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<div class="page">
|
|
125
|
-
<header class="mobile-header">
|
|
126
|
-
<div class="header-left">
|
|
127
|
-
<label class="nav-overlay-icon" for="__navigation">
|
|
128
|
-
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
|
129
|
-
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
|
130
|
-
</label>
|
|
131
|
-
</div>
|
|
132
|
-
<div class="header-center">
|
|
133
|
-
<a href="index"><div class="brand">Koffi</div></a>
|
|
134
|
-
</div>
|
|
135
|
-
<div class="header-right">
|
|
136
|
-
<div class="theme-toggle-container theme-toggle-header">
|
|
137
|
-
<button class="theme-toggle">
|
|
138
|
-
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
|
139
|
-
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
|
140
|
-
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
|
141
|
-
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
|
142
|
-
</button>
|
|
143
|
-
</div>
|
|
144
|
-
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
|
145
|
-
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
|
146
|
-
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
|
147
|
-
</label>
|
|
148
|
-
</div>
|
|
149
|
-
</header>
|
|
150
|
-
<aside class="sidebar-drawer">
|
|
151
|
-
<div class="sidebar-container">
|
|
152
|
-
|
|
153
|
-
<div class="sidebar-sticky"><a class="sidebar-brand" href="index">
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<span class="sidebar-brand-text">Koffi</span>
|
|
157
|
-
|
|
158
|
-
</a><form class="sidebar-search-container" method="get" action="search" role="search">
|
|
159
|
-
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
|
160
|
-
<input type="hidden" name="check_keywords" value="yes">
|
|
161
|
-
<input type="hidden" name="area" value="default">
|
|
162
|
-
</form>
|
|
163
|
-
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
|
164
|
-
<ul class="current">
|
|
165
|
-
<li class="toctree-l1"><a class="reference internal" href="platforms">Requirements</a></li>
|
|
166
|
-
<li class="toctree-l1"><a class="reference internal" href="start">Quick start</a></li>
|
|
167
|
-
<li class="toctree-l1"><a class="reference internal" href="types">Data types</a></li>
|
|
168
|
-
<li class="toctree-l1"><a class="reference internal" href="functions">Functions</a></li>
|
|
169
|
-
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Memory usage</a></li>
|
|
170
|
-
<li class="toctree-l1"><a class="reference internal" href="benchmarks">Benchmarks</a></li>
|
|
171
|
-
<li class="toctree-l1"><a class="reference internal" href="contribute">Contributing</a></li>
|
|
172
|
-
<li class="toctree-l1"><a class="reference internal" href="changes">Changelog</a></li>
|
|
173
|
-
</ul>
|
|
174
|
-
|
|
175
|
-
</div>
|
|
176
|
-
<div style="text-align: center; margin-top: 2em;">
|
|
177
|
-
<a href="https://www.npmjs.com/package/koffi"><img src="https://img.shields.io/badge/NPM-2.O.1-brightgreen" alt="NPM"/></a>
|
|
178
|
-
<a href="https://github.com/Koromix/luigi/tree/master/koffi"><img src="https://img.shields.io/badge/GitHub-Koffi-ff6600" alt="GitHub"/></a>
|
|
179
|
-
</div></div>
|
|
180
|
-
|
|
181
|
-
</div>
|
|
182
|
-
|
|
183
|
-
</div>
|
|
184
|
-
</aside>
|
|
185
|
-
<div class="main">
|
|
186
|
-
<div class="content">
|
|
187
|
-
<div class="article-container">
|
|
188
|
-
<a href="#" class="back-to-top muted-link">
|
|
189
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
190
|
-
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
|
191
|
-
</svg>
|
|
192
|
-
<span>Back to top</span>
|
|
193
|
-
</a>
|
|
194
|
-
<div class="content-icon-container">
|
|
195
|
-
<div class="theme-toggle-container theme-toggle-content">
|
|
196
|
-
<button class="theme-toggle">
|
|
197
|
-
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
|
198
|
-
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
|
199
|
-
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
|
200
|
-
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
|
201
|
-
</button>
|
|
202
|
-
</div>
|
|
203
|
-
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
|
204
|
-
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
|
205
|
-
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
|
206
|
-
</label>
|
|
207
|
-
</div>
|
|
208
|
-
<article role="main">
|
|
209
|
-
<section id="memory-usage">
|
|
210
|
-
<h1>Memory usage<a class="headerlink" href="#memory-usage" title="Permalink to this heading">#</a></h1>
|
|
211
|
-
<section id="how-it-works">
|
|
212
|
-
<h2>How it works<a class="headerlink" href="#how-it-works" title="Permalink to this heading">#</a></h2>
|
|
213
|
-
<p>For synchronous/normal calls, Koffi uses two preallocated memory blocks:</p>
|
|
214
|
-
<ul class="simple">
|
|
215
|
-
<li><p>One to construct the C stack and assign registers, subsequently used by the platform-specific assembly code (1 MiB by default)</p></li>
|
|
216
|
-
<li><p>One to allocate strings and big objects/structs (2 MiB by default)</p></li>
|
|
217
|
-
</ul>
|
|
218
|
-
<p>Unless very big strings or objects (at least more than one page of memory) are used, Koffi does not directly allocate any extra memory during calls or callbacks. However, please note that the JS engine (V8) might.</p>
|
|
219
|
-
<p>The size (in bytes) of these preallocated blocks can be changed. Use <code class="docutils literal notranslate"><span class="pre">koffi.config()</span></code> to get an object with the settings, and <code class="docutils literal notranslate"><span class="pre">koffi.config(obj)</span></code> to apply new settings.</p>
|
|
220
|
-
<div class="highlight-js notranslate"><div class="highlight"><pre><span></span><span class="linenos">1</span><span class="kd">let</span> <span class="nx">config</span> <span class="o">=</span> <span class="nx">koffi</span><span class="p">.</span><span class="nx">config</span><span class="p">();</span>
|
|
221
|
-
<span class="linenos">2</span><span class="nx">console</span><span class="p">.</span><span class="nx">log</span><span class="p">(</span><span class="nx">config</span><span class="p">);</span>
|
|
222
|
-
</pre></div>
|
|
223
|
-
</div>
|
|
224
|
-
<p>The same is true for asynchronous calls. When an asynchronous call is made, Koffi will allocate new blocks unless there is an unused (resident) set of blocks still available. Once the asynchronous call is finished, these blocks are freed if there are more than <code class="docutils literal notranslate"><span class="pre">resident_async_pools</span></code> sets of blocks left around.</p>
|
|
225
|
-
<p>There cannot be more than <code class="docutils literal notranslate"><span class="pre">max_async_calls</span></code> running at the same time.</p>
|
|
226
|
-
</section>
|
|
227
|
-
<section id="default-settings">
|
|
228
|
-
<h2>Default settings<a class="headerlink" href="#default-settings" title="Permalink to this heading">#</a></h2>
|
|
229
|
-
<div class="table-wrapper colwidths-auto docutils container">
|
|
230
|
-
<table class="docutils align-default">
|
|
231
|
-
<thead>
|
|
232
|
-
<tr class="row-odd"><th class="head"><p>Setting</p></th>
|
|
233
|
-
<th class="head"><p>Default</p></th>
|
|
234
|
-
<th class="head"><p>Description</p></th>
|
|
235
|
-
</tr>
|
|
236
|
-
</thead>
|
|
237
|
-
<tbody>
|
|
238
|
-
<tr class="row-even"><td><p>sync_stack_size</p></td>
|
|
239
|
-
<td><p>1 MiB</p></td>
|
|
240
|
-
<td><p>Stack size for synchronous calls</p></td>
|
|
241
|
-
</tr>
|
|
242
|
-
<tr class="row-odd"><td><p>sync_heap_size</p></td>
|
|
243
|
-
<td><p>2 MiB</p></td>
|
|
244
|
-
<td><p>Heap size for synchronous calls</p></td>
|
|
245
|
-
</tr>
|
|
246
|
-
<tr class="row-even"><td><p>async_stack_size</p></td>
|
|
247
|
-
<td><p>256 kiB</p></td>
|
|
248
|
-
<td><p>Stack size for asynchronous calls</p></td>
|
|
249
|
-
</tr>
|
|
250
|
-
<tr class="row-odd"><td><p>async_heap_size</p></td>
|
|
251
|
-
<td><p>512 kiB</p></td>
|
|
252
|
-
<td><p>Heap size for asynchronous calls</p></td>
|
|
253
|
-
</tr>
|
|
254
|
-
<tr class="row-even"><td><p>resident_async_pools</p></td>
|
|
255
|
-
<td><p>2</p></td>
|
|
256
|
-
<td><p>Number of resident pools for asynchronous calls</p></td>
|
|
257
|
-
</tr>
|
|
258
|
-
<tr class="row-odd"><td><p>max_async_calls</p></td>
|
|
259
|
-
<td><p>64</p></td>
|
|
260
|
-
<td><p>Maximum number of ongoing asynchronous calls</p></td>
|
|
261
|
-
</tr>
|
|
262
|
-
</tbody>
|
|
263
|
-
</table>
|
|
264
|
-
</div>
|
|
265
|
-
</section>
|
|
266
|
-
</section>
|
|
267
|
-
|
|
268
|
-
</article>
|
|
269
|
-
</div>
|
|
270
|
-
<footer>
|
|
271
|
-
|
|
272
|
-
<div class="related-pages">
|
|
273
|
-
<a class="next-page" href="benchmarks">
|
|
274
|
-
<div class="page-info">
|
|
275
|
-
<div class="context">
|
|
276
|
-
<span>Next</span>
|
|
277
|
-
</div>
|
|
278
|
-
<div class="title">Benchmarks</div>
|
|
279
|
-
</div>
|
|
280
|
-
<svg><use href="#svg-arrow-right"></use></svg>
|
|
281
|
-
</a>
|
|
282
|
-
<a class="prev-page" href="functions">
|
|
283
|
-
<svg><use href="#svg-arrow-right"></use></svg>
|
|
284
|
-
<div class="page-info">
|
|
285
|
-
<div class="context">
|
|
286
|
-
<span>Previous</span>
|
|
287
|
-
</div>
|
|
288
|
-
|
|
289
|
-
<div class="title">Functions</div>
|
|
290
|
-
|
|
291
|
-
</div>
|
|
292
|
-
</a>
|
|
293
|
-
</div>
|
|
294
|
-
<div class="bottom-of-page">
|
|
295
|
-
<div class="left-details">
|
|
296
|
-
<div class="copyright">
|
|
297
|
-
Copyright © 2022, Niels Martignène
|
|
298
|
-
</div>
|
|
299
|
-
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
|
300
|
-
|
|
301
|
-
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
|
302
|
-
|
|
303
|
-
</div>
|
|
304
|
-
<div class="right-details">
|
|
305
|
-
<div class="icons">
|
|
306
|
-
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
|
|
311
|
-
</footer>
|
|
312
|
-
</div>
|
|
313
|
-
<aside class="toc-drawer">
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
<div class="toc-sticky toc-scroll">
|
|
317
|
-
<div class="toc-title-container">
|
|
318
|
-
<span class="toc-title">
|
|
319
|
-
Contents
|
|
320
|
-
</span>
|
|
321
|
-
</div>
|
|
322
|
-
<div class="toc-tree-container">
|
|
323
|
-
<div class="toc-tree">
|
|
324
|
-
<ul>
|
|
325
|
-
<li><a class="reference internal" href="#">Memory usage</a><ul>
|
|
326
|
-
<li><a class="reference internal" href="#how-it-works">How it works</a></li>
|
|
327
|
-
<li><a class="reference internal" href="#default-settings">Default settings</a></li>
|
|
328
|
-
</ul>
|
|
329
|
-
</li>
|
|
330
|
-
</ul>
|
|
331
|
-
|
|
332
|
-
</div>
|
|
333
|
-
</div>
|
|
334
|
-
</div>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
</aside>
|
|
338
|
-
</div>
|
|
339
|
-
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
340
|
-
<script src="_static/jquery.js"></script>
|
|
341
|
-
<script src="_static/underscore.js"></script>
|
|
342
|
-
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
|
343
|
-
<script src="_static/doctools.js"></script>
|
|
344
|
-
<script src="_static/scripts/furo.js"></script>
|
|
345
|
-
</body>
|
|
346
|
-
</html>
|
|
Binary file
|