- Proposal: SE-NNNN
- Author: Karoy Lorentey, Alejandro Alonso
- Review Manager: TBD
- Bug: SR-9144
- Implementation: swiftlang/swift#68857
- Version: 2023-09-18
- Status: Awaiting review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file AllocaStackAllocator.hpp | |
| * @brief AllocaStackAllocator for fast, temporary allocations on a per-thread basis. | |
| * @author Andrés Brugarolas | |
| * | |
| * The StackAllocator is designed to provide efficient, alloca stack memory allocation | |
| * within a pre-allocated memory block. It supports fast allocation and deallocation, | |
| * caching of frequently used block sizes, and management of free space using an AVL tree. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| MIT License | |
| Copyright (c) 2023 Jiayin Cao | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*** MIT LICENSE | |
| Copyright (c) 2022 torcado | |
| Permission is hereby granted, free of charge, to any person | |
| obtaining a copy of this software and associated documentation | |
| files (the "Software"), to deal in the Software without | |
| restriction, including without limitation the rights to use, | |
| copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the | |
| Software is furnished to do so, subject to the following |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| const Channel = struct { | |
| value: u32 = undefined, | |
| frame: anyframe, | |
| }; | |
| fn generate(out_channel: **Channel) void { | |
| var ch = Channel{ .frame = @frame() }; | |
| suspend out_channel.* = &ch; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mod futex { | |
| use std::{sync::atomic::AtomicU32, time::Duration}; | |
| pub fn wait(_ptr: &AtomicU32, _cmp: u32, _timeout: Option<Duration>) -> bool { | |
| unimplemented!("TODO") | |
| } | |
| pub fn wake(_ptr: *const AtomicU32, _max_wake: u32) { | |
| unimplemented!("TODO") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "sync/atomic" | |
| "unsafe" | |
| ) | |
| type mutex struct { | |
| key uintptr | |
| } |
Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| pub fn main() !void { | |
| var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | |
| defer std.debug.assert(gpa.deinit()); | |
| const allocator = &gpa.allocator; | |
| const num_threads = std.math.max(1, (std.Thread.getCpuCount() catch 1) / 2); | |
| const epolls = try allocator.alloc(std.os.fd_t, num_threads); | |
| defer allocator.free(epolls); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [02/25/2025] | |
| Refs: | |
| 1. http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz | |
| 2. https://dl-cdn.alpinelinux.org/alpine/v3.21/releases/aarch64/alpine-virt-3.21.3-aarch64.iso | |
| 3. https://wiki.alpinelinux.org/wiki/Replacing_non-Alpine_Linux_with_Alpine_remotely | |
| 4. https://wiki.archlinux.org/index.php/installation_guide#Configure_the_system | |
| 5. https://archlinuxarm.org/platforms/armv8/generic | |
| See also: |
NewerOlder