Skip to content

runtime: free_memory() total_memory() return Result types #24651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 4, 2025

Conversation

kbkpbot
Copy link
Contributor

@kbkpbot kbkpbot commented Jun 4, 2025

Fix issue #24646

Fix for macos: free host port by using mach_port_deallocate()

Copy link

Connected to Huly®: V_0.6-23010

Copy link
Contributor

@lcheylus lcheylus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc/note for free_memory in vlib/runtime/runtime_nix.c.v must be updated with the new errors.

@lcheylus
Copy link
Contributor

lcheylus commented Jun 4, 2025

To have the same prototype on every system, total_memory and free_memory functions have to return Result type (!usize) on Windows too => vlib/runtime/runtime_windows.c.v.

@kbkpbot
Copy link
Contributor Author

kbkpbot commented Jun 4, 2025

To have the same prototype on every system, total_memory and free_memory functions have to return Result type (!usize) on Windows too => vlib/runtime/runtime_windows.c.v.

Already done.

@spytheman
Copy link
Member

Excellent work.

@spytheman spytheman merged commit 8c573cf into vlang:master Jun 4, 2025
64 checks passed
@kbkpbot kbkpbot deleted the fix-runtime-memory-error-return branch June 4, 2025 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants