Computer memory problems

Source: Internet
Author: User

The hardware of a computer is mainly controller, register, calculator, and input/output.

Fseek: pointer

Ftell: returns the current value.

Rewind: the header returned to the file

 

The computer bus is the CPU's external bus.

The memory of a computer is the memory.

Ram is inside the CPU, and ram acts as a buffer in the CPU. It is larger than the computer's memory, but the computing speed is slow.

 

There are two types of computer structures:

I. Von noriman structure: the Princeton structure, also known as the Von noriman structure, is a memory structure that combines program instruction memory and data storage.

Ii. Harvard structure: the Harvard structure is a storage structure that separates program instruction storage from data storage.

 

CS: indicates the code

DS: Indicates data.

SS: Stack segment

IP: Intra-segment offset

PC: indicates the next command to be executed.

Readelf-A. O (. o file) indicates viewing the. O File Link

The linker in the computer is not the same as the loader.

Note: The entry for all the assemblies is start.

 

About global variables and local variable storage:

I. Initialize all the global variables in data.

2. Put the initialized static local variables in data.

3. uninitialized global variables are placed in BSS.

4. Put uninitialized static local variables in BSS.

5. All local variables except static local variables are in the stack.

6. constants are stored in text (read-only.

7. All memory space applied to the system is in the heap.

Note: When calling a function, the stack comes out with advanced data.

A segment is called a stack needle.

The local variables of each function are in the stack needle of each function.

Malloc indicates a floating pointer.

Const indicates read-only, which is placed in the code segment

 

Man's help:

For example, MAN 3 fputc indicates viewing the help of fputc.

Int fputc (int c, file * Stream)

Where c is the integer variable C

* Stream indicates a text pointer.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.