当前位置:首页>Linux>Linux内存管理:vmalloc内存分配函数

Linux内存管理:vmalloc内存分配函数

  • 2026-03-16 06:47:54
Linux内存管理:vmalloc内存分配函数

vmalloc的核心是在vmalloc区域中找到合适的hole,hole是虚拟地址连续的;然后逐页分配内存来从物理上填充hole。

vmalloc的gfp_maks和逐页分配就决定了它的属性:可能睡眠、虚拟地址连续、物理地址不连续、size对齐到页;所以不适合小内存分配,开销较大。

一、Linux中常用内存分配函数的异同点

用户/内核API名称物理连续?大小限制单位场景
用户空间malloc/calloc/realloc/free 不保证 堆申请 字节calloc初始化为0;realloc改变内存大小。
alloca 栈申请 字节向栈申请内存
mmap/munmap将文件利用虚拟内存技术映射到内存中去。
brk、sbrk 虚拟内存到内存的映射。sbrk(0)返回program break地址,sbrk调整对的大小。
内核空间  vmalloc/vfree虚拟连续物理不定 vmalloc区大小限制 页VMALLOC区域可能睡眠,不能从中断上下文中调用,或其他不允许阻塞情况下调用。VMALLOC区域vmalloc_start~vmalloc_end之间,vmalloc比kmalloc慢,适用于分配大内存。
 slabkmalloc/kcalloc/krealloc/kfree物理连续64B-4MB(随slab而变) 2^order字节Normal区域大小有限,不如vmalloc/malloc大。最大/小值由KMALLOC_MIN_SIZE/KMALLOC_SHIFT_MAX,对应64B/4MB。从/proc/slabinfo中的kmalloc-xxxx中分配,建立在kmem_cache_create基础之上。
kmem_cache_create物理连续64B-4MB字节大小,需对齐Normal区域便于固定大小数据的频繁分配和释放,分配时从缓存池中获取地址,释放时也不一定真正释放内存。通过slab进行管理。
伙伴系统 get_free_page/get_free_pages物理连续 4MB(1024页)页Normal区域 __get_free_pages基于alloc_pages,但是限定不能使用HIGHMEM。
 alloc_page/alloc_pages/free_pages物理连续4MB 页Normal/Vmalloc都可  CONFIG_FORCE_MAX_ZONEORDER定义了最大页面数2^11,一次能分配到的最大页面数是1024。

二、vmalloc

2.1 重要数据结构

在进行vmalloc代码走读之前,先简单看一下两个重要的数据结构:struct vm_struct(vmalloc描述符)和struct vmap_area(记录在vmap_area_root中的vmalooc分配情况和vmap_area_list列表中)。

struct vm_struct {    struct vm_struct    *next;----------下一个vm。    void            *addr;--------------指向第一个内存单元虚拟地址    unsigned long        size;----------该内存区对应的大小    unsigned long        flags;---------vm标志位,如下。    struct page        **pages;---------指向页面没描述符的指针数组    unsigned int        nr_pages;-------vmalloc映射的page数目    phys_addr_t        phys_addr;-------用来映射硬件设备的IO共享内存,其他情况下为0    const void        *caller;----------调用vmalloc类函数的返回地址};

其中VM_NO_GUARD表示不需要多分配一页来做安全垫。

/* bits in flags of vmalloc's vm_struct below */#define VM_IOREMAP        0x00000001    /* ioremap() and friends */#define VM_ALLOC        0x00000002    /* vmalloc() */#define VM_MAP            0x00000004    /* vmap()ed pages */#define VM_USERMAP        0x00000008    /* suitable for remap_vmalloc_range */#define VM_VPAGES        0x00000010    /* buffer for pages was vmalloc'ed */#define VM_UNINITIALIZED    0x00000020    /* vm_struct is not fully initialized */#define VM_NO_GUARD        0x00000040      /* don't add guard page */#define VM_KASAN        0x00000080      /* has allocated kasan shadow memory */

vmap_area表示内核空间的vmalloc区域的一个vmalloc,由rb_node和list进行串联。

struct vmap_area {    unsigned long va_start;--------------malloc区的起始地址    unsigned long va_end;----------------malloc区的结束地址    unsigned long flags;-----------------类型标识    struct rb_node rb_node;         /* address sorted rbtree */----按地址的红黑树    struct list_head list;          /* address sorted list */------按地址的列表    struct list_head purge_list;    /* "lazy purge" list */    struct vm_struct *vm;------------------------------------------指向配对的vm_struct    struct rcu_head rcu_head;};

2.2 函数走查

vmalloc用于分配虚拟地址连续的内存空间,vzmalloc相对于vmalloc多了个0初始化。

同时vmalloc/vzmalloc分配的虚拟地址范围在VMALLOC_START/VMALLOC_END之间。

void *vmalloc(unsignedlong size){    return __vmalloc_node_flags(size, NUMA_NO_NODE,                    GFP_KERNEL | __GFP_HIGHMEM);}void *vzalloc(unsignedlong size){    return __vmalloc_node_flags(size, NUMA_NO_NODE,                GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO);}static void *__vmalloc_node(unsigned long size, unsigned long align,                gfp_t gfp_mask, pgprot_t prot,                int node, const void *caller){    return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END,                gfp_mask, prot, 0, node, caller);}

__vmalloc_node_range的主要工作是找到符合大小要求的空闲vmalloc区域的hole;分配页面,并创建页表映射关系。

下面是__vmalloc_node_range的主要子函数,反映了其主要工作内容。

__vmalloc_node_range----------------vmalloc的核心函数    __get_vm_area_node--------------找到符合大小的空闲vmalloc区域        alloc_vmap_area-------------从vmap_area_root中找到合适的hole,填充vmap_area结构体,并插入到vmap_area_root红黑树中        setup_vmalloc_vm------------将vmap_area的参数填入vm_struct    __vmalloc_area_node-------------计算需要的页面数,分配页面,并创建页表映射关系        alloc_page------------------分配页面        map_vm_area-----------------建立PGD/PTE页表映射关系

 __vmalloc_node_range是vmalloc的核心函数: 

void *__vmalloc_node_range(unsigned long size, unsigned long align,            unsigned long start, unsigned long end, gfp_t gfp_mask,            pgprot_t prot, unsigned long vm_flags, int node,            const void *caller){    struct vm_struct *area;    void *addr;    unsigned long real_size = size;    size = PAGE_ALIGN(size);----------------------------------------对地址进行了页对齐,哪怕分配10B大小也分配一页的空间。所以适合大内存分配。    if (!size || (size >> PAGE_SHIFT) > totalram_pages)-------------对size大小进行判断,大于0小于总page数        goto fail;    area = __get_vm_area_node(size, align, VM_ALLOC | VM_UNINITIALIZED |                vm_flags, start, end, node, gfp_mask, caller);------申请并填充vm_struct结构体。    if (!area)        goto fail;    addr = __vmalloc_area_node(area, gfp_mask, prot, node);---------分配内存,建立页面映射关系。    if (!addr)        return NULL;...    /*     * A ref_count = 2 is needed because vm_struct allocated in     * __get_vm_area_node() contains a reference to the virtual address of     * the vmalloc'ed block.     */    kmemleak_alloc(addr, real_size, 2, gfp_mask);-------------------kmemleak记录分配信息    return addr;----------------------------------------------------最后返回vmalloc分配区域的首地址...}

 __get_vm_area_node

static struct vm_struct *__get_vm_area_node(unsigned long size,        unsigned long align, unsigned long flags, unsigned long start,        unsigned long end, int node, gfp_t gfp_mask, const void *caller){    struct vmap_area *va;    struct vm_struct *area;    BUG_ON(in_interrupt());------------------------------------------------------vmalloc不能中在中断中被调用    if (flags & VM_IOREMAP)        align = 1ul << clamp(fls(size), PAGE_SHIFT, IOREMAP_MAX_ORDER);    size = PAGE_ALIGN(size);-----------------------------------------------------页对齐操作    if (unlikely(!size))        return NULL;    area = kzalloc_node(sizeof(*area), gfp_mask & GFP_RECLAIM_MASK, node);-------分配一个struct vm_struct来描述vmalloc区域    if (unlikely(!area))        return NULL;    if (!(flags & VM_NO_GUARD))        size += PAGE_SIZE;-------------------------------------------------------加一页作为安全区间    va = alloc_vmap_area(size, align, start, end, node, gfp_mask);---------------申请一个vmap_area并将其插入vmap_area_root中。    if (IS_ERR(va)) {        kfree(area);        return NULL;    }    setup_vmalloc_vm(area, va, flags, caller);-----------------------------------填充vmalloc描述符vm_struct area。    return area;}

alloc_vmap_area在整个vmalloc空间中查找一块大小合适并且每人使用的空间,即hole。空间范围是VMALLOC_START~VMALLOC_END。

static struct vmap_area *alloc_vmap_area(unsigned long size,                unsigned long align,                unsigned long vstart, unsigned long vend,                int node, gfp_t gfp_mask){    struct vmap_area *va;    struct rb_node *n;    unsigned long addr;    int purged = 0;    struct vmap_area *first;    BUG_ON(!size);    BUG_ON(size & ~PAGE_MASK);    BUG_ON(!is_power_of_2(align));    va = kmalloc_node(sizeof(struct vmap_area),--------------------分配一个vmap_area结构体            gfp_mask & GFP_RECLAIM_MASK, node);    if (unlikely(!va))        return ERR_PTR(-ENOMEM);    /*     * Only scan the relevant parts containing pointers to other objects     * to avoid false negatives.     */    kmemleak_scan_area(&va->rb_node, SIZE_MAX, gfp_mask & GFP_RECLAIM_MASK);retry:    spin_lock(&vmap_area_lock);    /*     * Invalidate cache if we have more permissive parameters.     * cached_hole_size notes the largest hole noticed _below_     * the vmap_area cached in free_vmap_cache: if size fits     * into that hole, we want to scan from vstart to reuse     * the hole instead of allocating above free_vmap_cache.     * Note that __free_vmap_area may update free_vmap_cache     * without updating cached_hole_size or cached_align.     */    if (!free_vmap_cache ||            size < cached_hole_size ||            vstart < cached_vstart ||            align < cached_align) {nocache:        cached_hole_size = 0;        free_vmap_cache = NULL;    }    /* record if we encounter less permissive parameters */    cached_vstart = vstart;    cached_align = align;    /* find starting point for our search */    if (free_vmap_cache) {        first = rb_entry(free_vmap_cache, struct vmap_area, rb_node);        addr = ALIGN(first->va_end, align);        if (addr < vstart)            goto nocache;        if (addr + size < addr)            goto overflow;    } else {        addr = ALIGN(vstart, align);        if (addr + size < addr)            goto overflow;        n = vmap_area_root.rb_node;--------------------------------------------vmap_area_root存放系统中正在使用的vmalloc块,为vmap_area结构。        first = NULL;        while (n) {------------------------------------------------------------遍历vmap_area_root左子叶节点找区间地址最小的区块。            struct vmap_area *tmp;            tmp = rb_entry(n, struct vmap_area, rb_node);            if (tmp->va_end >= addr) {                first = tmp;                if (tmp->va_start <= addr)                    break;-----------------------------------------------------此时tmp->va_start<=addr<=tmp->va_end,找到起始地址最小的vmalloc区块。                n = n->rb_left;            } else                n = n->rb_right;        }        if (!first)            goto found;    }    /* from the starting point, walk areas until a suitable hole is found */    while (addr + size > first->va_start && addr + size <= vend) {-------------判断申请空间addr+size的合法性。        if (addr + cached_hole_size < first->va_start)            cached_hole_size = first->va_start - addr;        addr = ALIGN(first->va_end, align);        if (addr + size < addr)            goto overflow;        if (list_is_last(&first->list, &vmap_area_list))            goto found;        first = list_entry(first->list.next,------------------------------------检查下一个hole是否满足                struct vmap_area, list);    }found:    if (addr + size > vend)        goto overflow;    va->va_start = addr;    va->va_end = addr + size;    va->flags = 0;    __insert_vmap_area(va);----------------------------------------------------将找到的新区块插入到vmap_area_root中    free_vmap_cache = &va->rb_node;    spin_unlock(&vmap_area_lock);    BUG_ON(va->va_start & (align-1));    BUG_ON(va->va_start < vstart);    BUG_ON(va->va_end > vend);    return va;overflow:    spin_unlock(&vmap_area_lock);    if (!purged) {        purge_vmap_area_lazy();        purged = 1;        goto retry;    }    if (printk_ratelimit())        pr_warn("vmap allocation for size %lu failed: "            "use vmalloc=<size> to increase size.\n", size);    kfree(va);    return ERR_PTR(-EBUSY);}

setup_vmalloc_vm主要用来设置vm_struct,同时将vm_struct和vmap_area关联。

staticvoidsetup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va,                  unsigned long flags, const void *caller){    spin_lock(&vmap_area_lock);    vm->flags = flags;    vm->addr = (void *)va->va_start;    vm->size = va->va_end - va->va_start;    vm->caller = caller;    va->vm = vm;    va->flags |= VM_VM_AREA;    spin_unlock(&vmap_area_lock);}

至此,已经在vmalloc找到合适大小的hole,并且将其插入到vmap_area_root中,更行了vmalloc描述符vm_struct。

__vmalloc_area_node则进行实际的页面分配,并建立页表映射,更新页表cache。

static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,                 pgprot_t prot, int node){    const int order = 0;    struct page **pages;    unsigned int nr_pages, array_size, i;    const gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO;    const gfp_t alloc_mask = gfp_mask | __GFP_NOWARN;    nr_pages = get_vm_area_size(area) >> PAGE_SHIFT;---------------------------------计算vmalloc描述符vm_struct->size需要多少页    array_size = (nr_pages * sizeof(struct page *));    area->nr_pages = nr_pages;    /* Please note that the recursion is strictly bounded. */    if (array_size > PAGE_SIZE) {----------------------------------------------------分配也表指针数组需要的空间        pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM,                PAGE_KERNEL, node, area->caller);        area->flags |= VM_VPAGES;    } else {        pages = kmalloc_node(array_size, nested_gfp, node);    }    area->pages = pages;    if (!area->pages) {        remove_vm_area(area->addr);        kfree(area);        return NULL;    }    for (i = 0; i < area->nr_pages; i++) {------------------------------------------逐页分配页框,这里也可以看出对vmalloc是无法保证屋里连续的,页不是一起分配,而是一页一页分配的。        struct page *page;        if (node == NUMA_NO_NODE)            page = alloc_page(alloc_mask);-----------------------------------------alloc_mask为GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN,所以优先在vmalloc区域,允许睡眠。        else            page = alloc_pages_node(node, alloc_mask, order);        if (unlikely(!page)) {            /* Successfully allocated i pages, free them in __vunmap() */            area->nr_pages = i;            goto fail;        }        area->pages[i] = page;        if (gfp_mask & __GFP_WAIT)            cond_resched();    }    if (map_vm_area(area, prot, pages))----------------------------------------------建议vmalloc区域的页面映射关系        goto fail;    return area->addr;fail:    warn_alloc_failed(gfp_mask, order,              "vmalloc: allocation failure, allocated %ld of %ld bytes\n",              (area->nr_pages*PAGE_SIZE), area->size);    vfree(area->addr);    return NULL;}

map_vm_area对分配的页面进行了映射,map_vm_area-->vmap_page_range-->vmap_page_range_noflush。

intmap_vm_area(struct vm_struct *area, pgprot_t prot, struct page **pages){    unsigned long addr = (unsigned long)area->addr;    unsigned long end = addr + get_vm_area_size(area);----------------确定映射的起始和结束地址    int err;    err = vmap_page_range(addr, end, prot, pages);    return err > 0 ? 0 : err;}staticintvmap_page_range(unsignedlong start, unsignedlong end,               pgprot_t prot, struct page **pages){    int ret;    ret = vmap_page_range_noflush(start, end, prot, pages);    flush_cache_vmap(start, end);    return ret;}

vmap_page_range_noflush建立了映射关系,但是没有刷新缓存。

staticintvmap_page_range_noflush(unsignedlong start, unsignedlong end,                   pgprot_t prot, struct page **pages){    pgd_t *pgd;    unsigned long next;    unsigned long addr = start;    int err = 0;    int nr = 0;    BUG_ON(addr >= end);    pgd = pgd_offset_k(addr);--------------------------------得到地址区域对应的PGD地址    do {-----------------------------------------------------遍历地址空间中的所有对应PGD;如果end和start在同一PGD区域,则只需要一次。        next = pgd_addr_end(addr, end);----------------------addr和end在同一PGD的话,next即为end;否则为addr下一个PGD对应起始地址。        err = vmap_pud_range(pgd, addr, next, prot, pages, &nr);        if (err)            return err;    } while (pgd++, addr = next, addr != end);    return nr;}staticintvmap_pte_range(pmd_t *pmd, unsignedlong addr,        unsigned long end, pgprot_t prot, struct page **pages, int *nr){    pte_t *pte;    /*     * nr is a running index into the array which helps higher level     * callers keep track of where we're up to.     */    pte = pte_alloc_kernel(pmd, addr);-------------------------------定位于addr对应的页表项    if (!pte)        return -ENOMEM;    do {        struct page *page = pages[*nr];------------------------------页描述符        if (WARN_ON(!pte_none(*pte)))            return -EBUSY;        if (WARN_ON(!page))            return -ENOMEM;        set_pte_at(&init_mm, addr, pte, mk_pte(page, prot));---------将页描述符对应的页框和页表项进行关联,映射关系被建立。        (*nr)++;    } while (pte++, addr += PAGE_SIZE, addr != end);    return 0;}

flush_cache_vmap则进行了相关操作:

staticinlinevoidflush_cache_vmap(unsignedlong start, unsignedlong end){    if (!cache_is_vipt_nonaliasing())        flush_cache_all();    else        /*         * set_pte_at() called from vmap_pte_range() does not         * have a DSB after cleaning the cache line.         */        dsb(ishst);}

原作者:ArnoldLu

原文地址:

https://www.cnblogs.com/arnoldlu/p/8251333.html

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 11:50:18 HTTP/2.0 GET : https://f.mffb.com.cn/a/478562.html
  2. 运行时间 : 0.103862s [ 吞吐率:9.63req/s ] 内存消耗:4,587.17kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=16af911ba37dd9a4dfe1c72338bac4f1
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000430s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000839s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000343s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000287s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000491s ]
  6. SELECT * FROM `set` [ RunTime:0.000200s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000588s ]
  8. SELECT * FROM `article` WHERE `id` = 478562 LIMIT 1 [ RunTime:0.000481s ]
  9. UPDATE `article` SET `lasttime` = 1774583418 WHERE `id` = 478562 [ RunTime:0.010490s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000244s ]
  11. SELECT * FROM `article` WHERE `id` < 478562 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000509s ]
  12. SELECT * FROM `article` WHERE `id` > 478562 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000529s ]
  13. SELECT * FROM `article` WHERE `id` < 478562 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002948s ]
  14. SELECT * FROM `article` WHERE `id` < 478562 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.000817s ]
  15. SELECT * FROM `article` WHERE `id` < 478562 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000745s ]
0.105413s