mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 23:04:54 +01:00
lib min_heap: Switch to size_t
size_t is the correct type for a count of objects that can fit in memory: this also means heaps now have the same memory layout as darrays (fs/bcachefs/darray.h), and darrays can be used as heaps. Cc: Kuan-Wei Chiu <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Coly Li <[email protected]> Cc: Peter Zijlstra <[email protected]> Signed-off-by: Kent Overstreet <[email protected]>
This commit is contained in:
1 parent
fbd152bf94
commit
dec6c0aac4
1 file changed
+2
-2
@@ -15,8 +15,8 @@
|
||||
*/
|
||||
#define MIN_HEAP_PREALLOCATED(_type, _name, _nr) \
|
||||
struct _name { \
|
||||
int nr; \
|
||||
int size; \
|
||||
size_t nr; \
|
||||
size_t size; \
|
||||
_type *data; \
|
||||
_type preallocated[_nr]; \
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user