# macho: redo how we allocate within a segment · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/f33b644c4ff776f9e0947d592ac7a5df452710b6)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: f33b644c4ff776f9e0947d592ac7a5df452710b6

Requested commit: f33b644c4ff776f9e0947d592ac7a5df452710b6

Commit: f33b644c4ff776f9e0947d592ac7a5df452710b6

Tree: b4eb64c47680f6afaaeab96d7c0cd2bfc6f61769

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
macho: redo how we allocate within a segment

Firstly, we preallocate segments offset and sizes, and then
when adding sections, we find the free space within each segment.
Currently, this applies to any segment that is not __LINKEDIT
segment since this requires special treatment.

```

## Parents

- [b090451646904006ac41b2b99e532489d89ea837](https://git.cafe/gitcafe/zig/commit/b090451646904006ac41b2b99e532489d89ea837?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/f33b644c4ff776f9e0947d592ac7a5df452710b6?format=markdown)
