Tenth Chapter Essays

Source: Internet
Author: User

First, prevent PRINTK function to reduce Linux drive performance

Extensive use of the PRINTK function to frequently manipulate log files or console device files can severely affect Linux drive performance (because the speed of writing disks is far from read and write memory), so it is required that the Linux driver use the PRINTK function to output information only during the development phase and remove it when it is officially released.

The PRINTK function displays messages in the console via the/dev/console device file, which functions only under the console of the character interface, so the PRINTK function is only used on the console of the character interface to output messages normally.

The difference between a variadic macro and a fixed-parameter macro is that a mutable parameter macro needs to get variable parameters for a variable parameter macro through the _va_args macro. _va_args macros do not support cases where the number of variable parameters is 0.

Ii. data interaction through a virtual file system (/PROC)

/proc is a virtual file system whose read and write operations are read and write to memory, read and write faster than the/dev file system, so it can be used as a tool for Linux to interact with user-space programs.

The current system's memory resources are obtained through the/proc/meminfo file. The action handler for the virtual file in the read-write directory is set by the Proc_dir_entry.read_proc and proc_dir_entry.read_write function pointers, and the Proc_dir_entry struct represents a virtual directory or file.

The read and write of a Linux file is determined by the properties, which can be represented in octal. Before deleting a virtual directory, delete the virtual files in the virtual directory.

Iii. 3 invocation formats for the list command

List, list_, and list n three formats, first displaying the code using the List command. Executing the above command will enter the GDB console and then execute the associated command to connect to the Android emulator.

Tenth Chapter Essays

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.