为size_t是在实践指针大小 [英] size_t is pointer size in practice
本文介绍了为size_t是在实践指针大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
首先,我要澄清的是,我现在非常熟悉的为size_t
和使用intptr_t
,和我不定义不想他们完成的任何重复。
Let me first clarify that I am by now very familiar with definitions of size_t
and intptr_t
, and I don't want any repetitions of what they accomplish.
相反,我想知道以下几点。你知道任何的平台,除了的的x86 / DOS(其难以承受的内存模型),其中投
Instead I would like to know the following. Do you know of any platform, except x86/DOS (with its unbearable memory models) where the cast
void* a = ...;
size_t b = (size_t)a;
的实际的丢失位或字节?
谢谢!
推荐答案
据我所知,在 AS / 400 指针是128位,但是为size_t被定义为32位的
AFAIK, on AS/400 pointers are 128-bit, but size_t is defined to be 32-bit.
这篇关于为size_t是在实践指针大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文