c语言内存池的实现原理,c语言内存布局

一、为什么需要使用内存池

在C/C++中我们通常使用malloc,free或new,delete来动态分配内存。

一方面,因为这些函数涉及到了系统调用,所以频繁的调用必然会导致程序性能的损耗;

另一方面,频繁的分配和释放小块内存会导致大量的内存碎片的产生,当碎片积累到一定的量之后,将无法分配到连续的内存空间,系统不得不进行碎片整理来满足分配到连续的空间,这样不仅会导致系统性能损耗,而且会导致程序对内存的利用率低下。

当然,如果我们的程序不需要频繁的分配和释放小块内存,那就没有使用内存池的必要,直接使用malloc,free或new,delete函数即可。

二、内存池的实现方案

内存池的实现原理大致如下:

提前申请一块大内存由内存池自己管理,并分成小片供给程序使用。程序使用完之后将内存归还到内存池中(并没有真正的从系统释放),当程序再次从内存池中请求内存时,内存池将池子中的可用内存片返回给程序使用。

我们在设计内存池的实现方案时,需要考虑到以下问题:

内存池是否可以自动增长?

如果内存池的最大空间是固定的(也就是非自动增长),那么当内存池中的内存被请求完之后,程序就无法再次从内存池请求到内存。所以需要根据程序对内存的实际使用情况来确定是否需要自动增长。

内存池的总内存占用是否只增不减?

如果内存池是自动增长的,就涉及到了“内存池的总内存占用是否是只增不减”这个问题了。试想,程序从一个自动增长的内存池中请求了1000个大小为100KB的内存片,并在使用完之后全部归还给了内存池,而且假设程序之后的逻辑最多之后请求10个100KB的内存片,那么该内存池中的900个100KB的内存片就一直处于闲置状态,程序的内存占用就一直不会降下来。对内存占用大小有要求的程序需要考虑到这一点。

内存池中内存片的大小是否固定?

如果每次从内存池中的请求的内存片的大小如果不固定,那么内存池中的每个可用内存片的大小就不一致,程序再次请求内存片的时候,内存池就需要在“匹配最佳大小的内存片”和“匹配操作时间”上作出衡量。“最佳大小的内存片”虽然可以减少内存的浪费,但可能会导致“匹配时间”变长。

内存池是否是线程安全的?

是否允许在多个线程中同时从同一个内存池中请求和归还内存片?这个线程安全可以由内存池来实现,也可以由使用者来保证。

内存片分配出去之前和归还到内存池之后,其中的内容是否需要被清除?

程序可能出现将内存片归还给内存池之后,仍然使用内存片的地址指针进行内存读写操作,这样就会导致不可预期的结果。将内容清零只能尽量的(也不一定能)将问题抛出来,但并不能解决任何问题,而且将内容清零会消耗一定的CPU时间。所以,最终最好还是需要由内存池的使用者来保证这种安全性。

是否兼容std::allocator?

STL标准库中的大多类都支持用户提供一个自定义的内存分配器,默认使用的是std::allocator,如std::string:

typedef basic_string<char, char_traits<char>, allocator<char> > string;

如果我们的内存池兼容std::allocator,那么我们就可以使用我们自己的内存池来替换默认的std::allocator分配器,如:

typedef basic_string<char, char_traits<char>, MemoryPoll<char> > mystring;

更多Linux内核视频教程资料文档私信【内核大礼包】自行获取。

 

三、内存池的具体实现

计划实现一个内存池管理的类MemoryPool,它具有如下特性:

  1. 内存池的总大小自动增长。
  2. 内存池中内存片的大小固定。
  3. 支持线程安全。
  4. 在内存片被归还之后,清除其中的内容。
  5. 兼容std::allocator。

因为内存池的内存片的大小是固定的,不涉及到需要匹配最合适大小的内存片,由于会频繁的进行插入、移除的操作,但查找比较少,故选用链表数据结构来管理内存池中的内存片。

MemoryPool中有2个链表,它们都是双向链表(设计成双向链表主要是为了在移除指定元素时,能够快速定位该元素的前后元素,从而在该元素被移除后,将其前后元素连接起来,保证链表的完整性):

  1. data_element_ 记录以及分配出去的内存片。
  2. free_element_ 记录未被分配出去的内存片。

MemoryPool实现代码

代码中使用了std::mutex等C++11才支持的特性,所以需要编译器最低支持C++11:

#ifndef PPX_BASE_MEMORY_POOL_H_

#define PPX_BASE_MEMORY_POOL_H_



#include <climits>

#include <cstddef>

#include <mutex>



namespace ppx {

    namespace base {

        template <typename T, size_t BlockSize = 4096, bool ZeroOnDeallocate = true>

        class MemoryPool {

        public:

            /* Member types */

            typedef T               value_type;

            typedef T*              pointer;

            typedef T&              reference;

            typedef const T*        const_pointer;

            typedef const T&        const_reference;

            typedef size_t          size_type;

            typedef ptrdiff_t       difference_type;

            typedef std::false_type propagate_on_container_copy_assignment;

            typedef std::true_type  propagate_on_container_move_assignment;

            typedef std::true_type  propagate_on_container_swap;



            template <typename U> struct rebind {

                typedef MemoryPool<U> other;

            };



            /* Member functions */

            MemoryPool() noexcept;

            MemoryPool(const MemoryPool& memoryPool) noexcept;

            MemoryPool(MemoryPool&& memoryPool) noexcept;

            template <class U> MemoryPool(const MemoryPool<U>& memoryPool) noexcept;



            ~MemoryPool() noexcept;



            MemoryPool& operator=(const MemoryPool& memoryPool) = delete;

            MemoryPool& operator=(MemoryPool&& memoryPool) noexcept;



            pointer address(reference x) const noexcept;

            const_pointer address(const_reference x) const noexcept;



            // Can only allocate one object at a time. n and hint are ignored

            pointer allocate(size_type n = 1, const_pointer hint = 0);

            void deallocate(pointer p, size_type n = 1);



            size_type max_size() const noexcept;



            template <class U, class... Args> void construct(U* p, Args&&... args);

            template <class U> void destroy(U* p);



            template <class... Args> pointer newElement(Args&&... args);

            void deleteElement(pointer p);



        private:

            struct Element_ {

                Element_* pre;

                Element_* next;

            };



            typedef char* data_pointer;

            typedef Element_ element_type;

            typedef Element_* element_pointer;



            element_pointer data_element_;

            element_pointer free_element_;



            std::recursive_mutex m_;



            size_type padPointer(data_pointer p, size_type align) const noexcept;

            void allocateBlock();



            static_assert(BlockSize >= 2 * sizeof(element_type), "BlockSize too small.");

        };





        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        inline typename MemoryPool<T, BlockSize, ZeroOnDeallocate>::size_type

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::padPointer(data_pointer p, size_type align)

            const noexcept {

            uintptr_t result = reinterpret_cast<uintptr_t>(p);

            return ((align - result) % align);

        }







        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        MemoryPool<T, BlockSize, ZeroOnDeallocate>::MemoryPool()

            noexcept {

            data_element_ = nullptr;

            free_element_ = nullptr;

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        MemoryPool<T, BlockSize, ZeroOnDeallocate>::MemoryPool(const MemoryPool& memoryPool)

            noexcept :

            MemoryPool() {

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        MemoryPool<T, BlockSize, ZeroOnDeallocate>::MemoryPool(MemoryPool&& memoryPool)

            noexcept {

            std::lock_guard<std::recursive_mutex> lock(m_);



            data_element_ = memoryPool.data_element_;

            memoryPool.data_element_ = nullptr;

            free_element_ = memoryPool.free_element_;

            memoryPool.free_element_ = nullptr;

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        template<class U>

        MemoryPool<T, BlockSize, ZeroOnDeallocate>::MemoryPool(const MemoryPool<U>& memoryPool)

            noexcept :

            MemoryPool() {

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        MemoryPool<T, BlockSize, ZeroOnDeallocate>&

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::operator=(MemoryPool&& memoryPool)

            noexcept {

            std::lock_guard<std::recursive_mutex> lock(m_);



            if (this != &memoryPool) {

                std::swap(data_element_, memoryPool.data_element_);

                std::swap(free_element_, memoryPool.free_element_);

            }

            return *this;

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        MemoryPool<T, BlockSize, ZeroOnDeallocate>::~MemoryPool()

            noexcept {

            std::lock_guard<std::recursive_mutex> lock(m_);



            element_pointer curr = data_element_;

            while (curr != nullptr) {

                element_pointer prev = curr->next;

                operator delete(reinterpret_cast<void*>(curr));

                curr = prev;

            }



            curr = free_element_;

            while (curr != nullptr) {

                element_pointer prev = curr->next;

                operator delete(reinterpret_cast<void*>(curr));

                curr = prev;

            }

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        inline typename MemoryPool<T, BlockSize, ZeroOnDeallocate>::pointer

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::address(reference x)

            const noexcept {

            return &x;

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        inline typename MemoryPool<T, BlockSize, ZeroOnDeallocate>::const_pointer

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::address(const_reference x)

            const noexcept {

            return &x;

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        void

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::allocateBlock() {

            // Allocate space for the new block and store a pointer to the previous one

            data_pointer new_block = reinterpret_cast<data_pointer> (operator new(BlockSize));

            element_pointer new_ele_pointer = reinterpret_cast<element_pointer>(new_block);

            new_ele_pointer->pre = nullptr;

            new_ele_pointer->next = nullptr;



            if (data_element_) {

                data_element_->pre = new_ele_pointer;

            }



            new_ele_pointer->next = data_element_;

            data_element_ = new_ele_pointer;

        }



        template <typename T, size_t BlockSize,  bool ZeroOnDeallocate>

        inline typename MemoryPool<T, BlockSize, ZeroOnDeallocate>::pointer

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::allocate(size_type n, const_pointer hint) {

            std::lock_guard<std::recursive_mutex> lock(m_);



            if (free_element_ != nullptr) {

                data_pointer body =

                    reinterpret_cast<data_pointer>(reinterpret_cast<data_pointer>(free_element_) + sizeof(element_type));



                size_type bodyPadding = padPointer(body, alignof(element_type));



                pointer result = reinterpret_cast<pointer>(reinterpret_cast<data_pointer>(body + bodyPadding));



                element_pointer tmp = free_element_;



                free_element_ = free_element_->next;



                if (free_element_)

                    free_element_->pre = nullptr;



                tmp->next = data_element_;

                if (data_element_)

                    data_element_->pre = tmp;

                tmp->pre = nullptr;

                data_element_ = tmp;



                return result;

            }

            else {

                allocateBlock();



                data_pointer body =

                    reinterpret_cast<data_pointer>(reinterpret_cast<data_pointer>(data_element_) + sizeof(element_type));



                size_type bodyPadding = padPointer(body, alignof(element_type));



                pointer result = reinterpret_cast<pointer>(reinterpret_cast<data_pointer>(body + bodyPadding));



                return result;

            }

        }



        template <typename T, size_t BlockSize, bool ZeroOnDeallocate>

        inline void

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::deallocate(pointer p, size_type n) {

            std::lock_guard<std::recursive_mutex> lock(m_);



            if (p != nullptr) {

                element_pointer ele_p =

                    reinterpret_cast<element_pointer>(reinterpret_cast<data_pointer>(p) - sizeof(element_type));



                if (ZeroOnDeallocate) {

                    memset(reinterpret_cast<data_pointer>(p), 0, BlockSize - sizeof(element_type));

                }



                if (ele_p->pre) {

                    ele_p->pre->next = ele_p->next;

                }



                if (ele_p->next) {

                    ele_p->next->pre = ele_p->pre;

                }



                if (ele_p->pre == nullptr) {

                    data_element_ = ele_p->next;

                }



                ele_p->pre = nullptr;

                if (free_element_) {

                    ele_p->next = free_element_;

                    free_element_->pre = ele_p;

                }

                else {

                    ele_p->next = nullptr;

                }

                free_element_ = ele_p;

            }

        }



        template <typename T, size_t BlockSize, bool ZeroOnDeallocate>

        inline typename MemoryPool<T, BlockSize, ZeroOnDeallocate>::size_type

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::max_size()

            const noexcept {

            size_type maxBlocks = -1 / BlockSize;

            return (BlockSize - sizeof(data_pointer)) / sizeof(element_type) * maxBlocks;

        }



        template <typename T, size_t BlockSize, bool ZeroOnDeallocate>

        template <class U, class... Args>

        inline void

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::construct(U* p, Args&&... args) {

            new (p) U(std::forward<Args>(args)...);

        }



        template <typename T, size_t BlockSize, bool ZeroOnDeallocate>

        template <class U>

        inline void

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::destroy(U* p) {

            p->~U();

        }



        template <typename T, size_t BlockSize, bool ZeroOnDeallocate>

        template <class... Args>

        inline typename MemoryPool<T, BlockSize, ZeroOnDeallocate>::pointer

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::newElement(Args&&... args) {

            std::lock_guard<std::recursive_mutex> lock(m_);

            pointer result = allocate();

            construct<value_type>(result, std::forward<Args>(args)...);

            return result;

        }



        template <typename T, size_t BlockSize, bool ZeroOnDeallocate>

        inline void

            MemoryPool<T, BlockSize, ZeroOnDeallocate>::deleteElement(pointer p) {

            std::lock_guard<std::recursive_mutex> lock(m_);

            if (p != nullptr) {

                p->~value_type();

                deallocate(p);

            }

        }

    }

}



#endif // PPX_BASE_MEMORY_POOL_H_



使用示例:

#include <iostream>

#include <thread>

using namespace std;







class Apple {

public:

    Apple() {

        id_ = 0;

        cout << "Apple()" << endl;

    }



    Apple(int id) {

        id_ = id;

        cout << "Apple(" << id_ << ")" << endl;

    }



    ~Apple() {

        cout << "~Apple()" << endl;

    }



    void SetId(int id) {

        id_ = id;

    }



    int GetId() {

        return id_;

    }

private:

    int id_;

};







void ThreadProc(ppx::base::MemoryPool<char> *mp) {

    int i = 0;

    while (i++ < 100000) {

        char* p0 = (char*)mp->allocate();



        char* p1 = (char*)mp->allocate();



        mp->deallocate(p0);



        char* p2 = (char*)mp->allocate();



        mp->deallocate(p1);

        

        mp->deallocate(p2);



    }

}



int main()

{

    ppx::base::MemoryPool<char> mp;

    int i = 0;

    while (i++ < 100000) {

        char* p0 = (char*)mp.allocate();



        char* p1 = (char*)mp.allocate();



        mp.deallocate(p0);



        char* p2 = (char*)mp.allocate();



        mp.deallocate(p1);



        mp.deallocate(p2);



    }



    std::thread th0(ThreadProc, &mp);

    std::thread th1(ThreadProc, &mp);

    std::thread th2(ThreadProc, &mp);



    th0.join();

    th1.join();

    th2.join();



    Apple *apple = nullptr;

    {

        ppx::base::MemoryPool<Apple> mp2;

        apple = mp2.newElement(10);

        int a = apple->GetId();

        apple->SetId(10);

        a = apple->GetId();



        mp2.deleteElement(apple);

    }



    apple->SetId(12);

    int b = -4 % 4;



    int *a = nullptr;

    {

        ppx::base::MemoryPool<int, 18> mp3;

        a =  mp3.allocate();

        *a = 100;

        //mp3.deallocate(a);



        int *b =  mp3.allocate();

        *b = 200;

        //mp3.deallocate(b);



        mp3.deallocate(a);

        mp3.deallocate(b);



        int *c = mp3.allocate();

        *c = 300;

    }



    getchar();

    return 0;

}



本文来自投稿,不代表展天博客立场,如若转载,请注明出处:https://www.me900.com/326675.html

赞 (0)

相关推荐

  • 乌海市乌达区打新兵(内蒙古军区动员局最新动态)

      他们像战马一样冲锋战“疫” ——内蒙古军区组织官兵和民兵参加疫情防控工作纪实 “现有确诊29人,较昨天减少3人;累计治愈46人,较昨天增加3人;累计确诊75人,较昨天增加0人……自2月19日以来,内蒙古已连续14天没有增加确诊人数。”内蒙古自治区卫健委相关负责人说,内蒙古在全国范围内较早实现“零报告”,这与我们军地双方的共同努力是分不开的。 疫…

    2023-06-14
  • 看配料表怎么计算热量(怎么看食品包装热量表)

    日常生活中,我们的食品包装袋配料表旁边,如果你仔细看的话,有一个营养成分表,里面会有多少多少卡路里。之前在电影《西虹市首富》上映后,影片中的那首《卡路里》的歌也是红极一时。 具体地说,在一个大气压下,1卡是将1毫升(也就是1克)水的温度升高1°C所需的能量。实际生活中,我们常用 “千卡” 来作为衡量食物热量的单位,也就是说1千卡是将1升水的温度升高1°C所需…

    2023-04-07
  • 农村赶集日挣1000(农村赶集多久一次)

    嗨,大家好,我们又见面了,我是你们的老朋友农民大张,感谢大家一直以来对我的支持和鼓励,有了你们的支持我的写作之路才能走得更长远。今天老规矩,我们继续来聊聊农村创业那些事,本文给大家分享一个农村宝妈小本创业赚大钱的经历,如果您也想在农村创业的话,那么请认真看完本文,或许真能给您带来很大的帮助。 到了晚上,我收到了小吴的十元微信转账和留言,她告诉我说:这十块钱是…

    2023-02-16
  • 琴帝叶音竹有几个女人(琴帝小说)

    琴帝叶音竹有几个女人(琴帝小说)琴帝叶音竹有几个女人(琴帝小说)琴帝叶音竹有几个女人(琴帝小说)琴帝叶音竹有几个女人(琴帝小说)

    第一本《琴帝》 简介:九叠琴音震寰宇,谁敢闻言不识君? 七色魔法代**,雄雄揭大幕。 琴之帝王,给这片大陆带来翻天覆地的改革。 伴随着旷古绝今的赤子琴心的出现, 一代琴魔法师,在碧空海之中悄然诞生。 这将是一个单纯的少年,逐渐成为琴中帝王的故事。 精彩片段:随着七彩虹光的波动,苏拉、海洋、安雅,以及两位塔主的目光变得越来越沉重。孩子们更是不敢说话。绝望的情绪…

    2022-01-08 • 投稿
  • 天玑800u是什么东西?天玑800u属于骁龙多少

    天玑800u是什么东西?天玑800u属于骁龙多少天玑800u是什么东西?天玑800u属于骁龙多少天玑800u是什么东西?天玑800u属于骁龙多少天玑800u是什么东西?天玑800u属于骁龙多少

    对于2020年的整个智能手机市场来说,将联发科称为最大的赢家似乎并不过分。一方面来说,他们发布于2019年底的5G旗舰SoC天玑1000系列随着iQOO Z1及Redmi K30尊享版等机型的热卖,开始逐渐为公众所认知和接受,在高性能市场也站稳了脚跟;而在另一方面,定位中端的联发科天玑720、天玑800,以及天玑820则更是在市场中有着明显的性价比优势,成为…

    2022-04-13 • 投稿
  • 御龙在天礼包领取 怎么领取御龙在天礼包

    御龙在天手游礼包怎么领取,礼包大全领取方法详解。前段时间看见很多人都不晓得如何领取礼包,以及礼包领取入口,下面小编就来说下礼包领取方法。 首先礼包分为媒体礼包和官方礼包,所以对应的领取方法也是不同的。 口袋巴士御龙在天手游礼包 点击图中红色箭头符号中的按钮,点击礼包,这样就会口袋的礼包中心。然后在搜索页面处,输入御龙在天手游,如下图所示。 按照步骤1和2来,…

    2023-06-04
  • 免费qq号申请,免费qq号申请官网

    《免费qq号申请:全面指南与深入解析》 一、申请前的准备 在开始申请免费qq号之前,也许我们需要做一些准备工作。就好像我们要去参加一场重要的活动,需要提前整理好自己的物品一样。我们需要确保自己有一台可以连接网络的设备,无论是电脑、手机还是平板电脑。这就像是我们参加活动的入场券,没有它,我们就无法进入申请的大门。 同时,我们也需要有一个稳定的网络环境,这样才能…

    2025-09-07
  • xp自动登录,xp自动登录的三种方法

    《关于XP自动登录的深入探讨》 一、XP自动登录的概念及常见情况 在WindowsXP系统中,自动登录是一种方便用户的设置,它允许计算机在启动后无需手动输入用户名和密码,直接进入系统桌面。也许你在使用电脑的过程中,偶尔会遇到这样的情况,就是电脑开机后自动登录到了某个特定的用户账号,而不需要你进行额外的操作。这就是XP自动登录的基本概念和常见表现形式。 我觉得…

    2025-10-16
  • 什么游戏可以赚钱,详细解释游戏赚钱榜单

    什么游戏可以赚钱,详细解释游戏赚钱榜单什么游戏可以赚钱,详细解释游戏赚钱榜单什么游戏可以赚钱,详细解释游戏赚钱榜单什么游戏可以赚钱,详细解释游戏赚钱榜单

    好多小伙伴们都有一个疑问总是看到这个游戏很赚钱那个游戏很赚钱,从来不自己去试试水!从来不自己去进游戏里面去看看这个游戏物价,操作啥的点卡或者人气就去说一个游戏多赚钱,多赚钱也是人家说的你没有在里面体会!在不赚钱的游戏只要是工作室上了规模以后都变得赚了钱,还有就是赚钱的游戏人家为什么会告诉你?自己基本上就操作了谁不想着多赚钱啊还得给你说赚钱叫你也来分一杯羹! …

    2022-04-22 • 投稿
  • 电脑强制关闭程序快捷键(电脑任务管理器快捷键)

    电脑怎样结束运行程序?大家都知道,我们的电脑打开一个软件后,它的右上角会有一个“×”,点击它有的软件是直接关闭,有的软件会询问关闭还是最小化,而有的则是直接最小化。如何强制关闭电脑程序运行?在软件死机而无法通过正常关闭方式结束不了运行的时候该如何是好?下面来看看如何解决! 步骤1.摁住键盘上的“Ctrl+Shift+Esc”或者“Ctrl+Alt+Delet…

    2023-05-27
  • 除湿机品牌推荐,哪个牌子的除湿机性价比高

    除湿机品牌推荐,哪个牌子的除湿机性价比高除湿机品牌推荐,哪个牌子的除湿机性价比高除湿机品牌推荐,哪个牌子的除湿机性价比高除湿机品牌推荐,哪个牌子的除湿机性价比高

    南方有一个一直被人们关注的话题,“回南天,梅雨季来临,如何除湿”,每年天气带来的潮湿问题,是让人很烦恼的事情,家里潮湿会使食物加快发霉,家具受损,可见去湿对我们的生活是多么重要 为了有效改善除湿问题,除湿机诞生了。由于市场上的除湿机五花八门,很多新手一时间挑花了眼,除湿机具体有什么好处呢? 使用除湿机的好处 1、减少疾病发生率 室内湿度降低,细菌滋生减少,湿…

    2023-07-09 • 投稿
  • 卖小吃教程赚钱(各种小吃视频教学及配方)

      现在要说虚拟赚钱项目有很多,就比如我们今天说的卖小吃教程。 我们走在大街小巷,随处可见的都是各种小吃,有的问道非常好,有的简直难以下咽,很多想低成本创业的人也意识到了这一点,不断的到处找各种小吃教程。 这些人当中有的人找小吃教程是打算自己学习一下,然后做出可口的小吃去销售,但是其中有很大一部分人他们并不是直接想去学习做小吃,而是整理这些小吃教程…

    2021-11-12