Skip to content

Commit 010d66f

Browse files
Added nstd.os.unix.alloc.
1 parent b34b6f4 commit 010d66f

File tree

7 files changed

+13
-3
lines changed

7 files changed

+13
-3
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ nstd_heap_ptr = ["nstd_alloc", "nstd_core"]
3333
nstd_io = ["nstd_alloc", "nstd_core", "nstd_string", "nstd_vec", "std"]
3434
nstd_math = ["std"]
3535
nstd_os = []
36+
nstd_os_unix_alloc = []
3637
nstd_os_unix_shared_lib = ["libc", "nstd_core", "nstd_os"]
3738
nstd_os_windows_alloc = [
3839
"nstd_core", "nstd_os", "windows-sys/Win32_Foundation", "windows-sys/Win32_System_Memory"

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ int main()
4949
- `stdout` - A handle to the standard output stream.
5050
- `math` - High level math operations.
5151
- `os` - Operating system specific functionality.
52-
- `unix` - Low level Unix like operating system support.
53-
- `shared_lib` - Provides shared library access for Unix like systems.
52+
- `unix` - Low level Unix-like operating system support.
53+
- `alloc` - Memory allocation for Unix-like systems.
54+
- `shared_lib` - Provides shared library access for Unix-like systems.
5455
- `windows` - OS support for Windows.
5556
- `alloc` - Low level memory allocation for Windows.
5657
- `heap` - Process heap management for Windows.

include/nstd/os/unix.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#ifndef NSTD_OS_UNIX_H
22
#define NSTD_OS_UNIX_H
3+
#include "unix/alloc.h"
34
#include "unix/shared_lib.h"
45
#endif

include/nstd/os/unix/alloc.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifndef NSTD_OS_UNIX_ALLOC_H
2+
#define NSTD_OS_UNIX_ALLOC_H
3+
#endif

src/os/unix.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
//! Low level Unix like operating system support.
2+
#[cfg(feature = "nstd_os_unix_alloc")]
3+
#[cfg_attr(doc_cfg, doc(cfg(feature = "nstd_os_unix_alloc")))]
4+
pub mod alloc;
25
#[cfg(feature = "nstd_os_unix_shared_lib")]
36
#[cfg_attr(doc_cfg, doc(cfg(feature = "nstd_os_unix_shared_lib")))]
47
pub mod shared_lib;

src/os/unix/alloc.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//! Memory allocation for Unix-like systems.

test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22

33
FEATURES = ("nstd_alloc", "nstd_core", "nstd_cstring", "nstd_fs", "nstd_heap_ptr", "nstd_io",
4-
"nstd_math", "nstd_os_unix_shared_lib", "nstd_os_windows_alloc",
4+
"nstd_math", "nstd_os_unix_alloc", "nstd_os_unix_shared_lib", "nstd_os_windows_alloc",
55
"nstd_os_windows_shared_lib", "nstd_shared_lib", "nstd_shared_ptr", "nstd_string",
66
"nstd_vec")
77

0 commit comments

Comments
 (0)