728x90

LPVOID

이번에는 짧게 소개하겠다.

평소에 malloc을 활용하다 보면 (void *)를 본 경험이 있다. 이 LPVOID은 이와 비슷하게 void * far 에 해당하는 것이다.

 

추가적으로 이전 intel X86 계열에서 메모리 Mapping segment(16bit) offset(4bit)의 형태로 다루었다.

en.wikipedia.org/wiki/Intel_Memory_Model (segment와 offset 공간 약간의 설명)

 

near포인터의 경우 offset만을 활용한 포인터이고, far 포인터의 경우 segment offset을 모두 다루는 포인터이다.

, near64kb, far1Mb의 공간을 갖고 있는 포인터이다.

 

 

+) 추가적인 궁금증

www.sciencedirect.com/topics/engineering/address-offset

 

Address Offset - an overview | ScienceDirect Topics

• With 8-bit or 16-bit architecture, multiple registers are required to hold large data items and often these architectures have fewer registers compared to ARM, so more stacking would be required. • More powerful addressing modes in ARM means address

www.sciencedirect.com

이 글을 읽어보니 The 8086 processor has a 20-bit address bus를 활용한다 한다.

이때, 20bit는 1MB에 해당하는 공간이다. 기본적으로 16bit의 공간이 할당되고 남은 4 bit는 address offset으로 데이터를 저장하는 공간이라고 하는데, 이를 더 활용하면 더 큰 주소값에 접근이 가능하다는 것인데, 말로는 알겠지만, 구조적으로 어떻게 활용하는지는 더 알아보자.

 

 

 

+ α)

en.wikipedia.org/wiki/X86_memory_segmentation

 

x86 memory segmentation - Wikipedia

x86 memory segmentation refers to the implementation of memory segmentation in the Intel x86 computer instruction set architecture. Segmentation was introduced on the Intel 8086 in 1978 as a way to allow programs to address more than 64 KB (65,536 bytes)

en.wikipedia.org

 

 

+ Recent posts