Closed
Description
The C-standard definition of size_t
states that it must be able to represent the size of any object in bytes. It therefore makes sense for size_t
to be defined as uint
, to make it equal to the pointer size. Currently (as an example) it's defined as u32
on x86 and u64
on x86-64, but this poses problems with the malloc
family of functions in std::libc::funcs::c95::stdlib
that accept a size_t
, since it is currently invalid to pass them a uint
without casting. It makes the most sense to specify the size of a memory allocation with a type of size equal to that of a pointer, so you shouldn't need to do a cast to pass these functions values.