[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Eliminating grub_size_t

From: Pavel Roskin
Subject: Re: Eliminating grub_size_t
Date: Wed, 02 Jul 2008 13:51:48 -0400

On Wed, 2008-07-02 at 20:46 +0300, Vesa Jääskeläinen wrote:

> If reiserfs is using it in wrong place, fix the reiserfs. If you are 
> reading some file system variable, then you should use grub_uintN_t to 
> specify storage size in bits.

OK, I'll have another look at the code.

> size_t is usually used as common index or offset (or size) to some 
> buffer. size_t is returned by sizeof(). It is meant to be optimal size 
> for platform. Eg. on 64bit memory bus it is 64bit and on 32bit memory 
> bus it is 32bit. What grub is doing here is just defining yet another 
> type for the same thing.
> Google for size_t if you want to find out more about it.

I know what it is.  I believe int should be as good as size_t for most
purposes is we are not working with very large structures or read
gigabytes of data from files at once.

Pavel Roskin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]