From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4ffeabe415eb136f18a308b2f677ce39@hamnavoe.com> To: 9fans@9fans.net From: Richard Miller <9fans@hamnavoe.com> Date: Thu, 22 Nov 2012 13:26:36 +0000 In-Reply-To: <1180b98907e2cb6d8528c3fcf09ef589@ladd.quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] go forth and ulong no more! Topicbox-Message-UUID: e06ff99e-ead7-11e9-9d60-3106f5b1d025 > so what do you want to do about usize. i can't easily just make it 64-bits on > nix, because that would require that we get some changes in sources. malloc > would need to be fixed, etc. Just tell the plain truth - have I got this right? Usize is an unsigned integer which can hold the maximum size of an object declared statically (the sizeof operator returns a value of type usize) or created by the usual allocation functions (the size argument of malloc is - or should be? - type usize). Usize may be smaller than uintptr, for example on amd64 where uintptr is 64 bits and usize is 32. On such machines it may still be possible to make larger allocations (eg by writing a megamalloc function with a size argument in megabyte units) but not to use a usize variable to represent the length of the returned objects. >> OTOH, it's not worth making special provision for physical memory addresses. >>... > you need it for PAE. i also find it to be great documentation. imo, it helps > in writing correct code, and understanding it later. Yes, I've come around to agree with this.