Commit graph

10 commits

Author SHA1 Message Date
Andreas Kling 88c8451973 AK: Bring back FixedArray<T>
Let's bring this class back, but without the confusing resize() API.
A FixedArray<T> is simply a fixed-size array of T.

The size is provided at run-time, unlike Array<T> where the size is
provided at compile-time.
2021-07-11 17:42:31 +02:00
asynts 70dd97c46e AK: Remove FixedArray class. 2020-09-08 14:01:21 +02:00
asynts 1b3ecb01a5 AK: Add generic SimpleIterator class to replace VectorIterator. 2020-09-08 14:01:21 +02:00
Tom 80560d1be3 AK: Fix FixedArray zero bytes allocations 2020-08-30 17:30:48 +02:00
asynts 8e7dfebf11 AK: Add bytes() method to FixedArray. 2020-08-15 21:21:18 +02:00
Andreas Kling a7dbb3cf96 Kernel: Use a FixedArray for a process's extra GIDs
There's not really enough of these to justify using a HashTable.
2020-02-18 11:35:47 +01:00
William McPherson ddefb95b21 AK: Add FixedArray::data() 2020-01-31 13:13:04 +01:00
Andreas Kling 94ca55cefd Meta: Add license header to source files
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.

For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.

Going forward, all new source files should include a license header.
2020-01-18 09:45:54 +01:00
Andreas Kling c48acafcba AK: Add assertions to FixedArray::operator[]
Let's catch ourselves if we ever index out of bounds into one of these.
2020-01-07 14:49:33 +01:00
Andreas Kling 5096eaa845 AK: Add a FixedArray<T> container
This is a simple array wrapper that knows its size. It has begin/end
so you can use range-for. It also has a resize() that reallocates.
2019-08-07 20:05:36 +02:00