当前位置: 当前位置:首页 >应用开发 >Linux驱动技术(一) _内存申请 正文

Linux驱动技术(一) _内存申请

2025-11-05 12:09:39 来源:多维IT资讯作者:系统运维 点击:819次
Linux驱动技术(一) _内存申请
复制/**   * kmalloc - allocate memory   * @size: how many bytes of memory are required.   * @flags: the type of memory to allocate.   * The @flags argument may be one of:   * %GFP_USER - Allocate memory on behalf ofuser.  May sleep.   * %GFP_KERNEL - Allocate normal kernel ram.  May sleep.   * %GFP_ATOMIC - Allocation will not sleep.  May use emergency pools.   *    * For example,驱请 use this inside interrupt handlers.   */  void *kmalloc(size_t size, gfp_t flags);  /**   * kfree - free previously allocated memory   * @objp: pointer returned by kmalloc.   * If @objp isNULL, no operation is performed.   */  void kfree(const void *objp);   1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.
作者:人工智能
------分隔线----------------------------
头条新闻
图片新闻
新闻排行榜