malloc

malloc

 英

  • 网络分配;内存;分配内存

例句

Now, you might think that this would cause problems for programs calling malloc -- how do they know about this struct?

现在可能认为程序调用malloc引发问题——它们如何知道这个结构

If you need 15 bytes, ask for 15 bytes; don't round it up to 32 bytes or some other bigger chunk like you used to do when you used malloc.

如果需要15字节请求15字节不要使用malloc时候那样进位32字节或者更大大小

It is possible for malloc to overcommit, and some other process may get the resource before the current process, resulting in a failure.

malloc可能过量分配内存其他进程可能当前进程之前获得资源导致错误

malloc_init is going to be our function to initialize our memory allocator.

malloc_init初始内存分配程序函数

If the user needs to track malloc and free calls in a particular user function, the malloc. d script can be modified as shown below.

如果用户需要跟踪某个用户函数mallocfree调用那么可以以下方式修改malloc.d脚本

Since the session is a malloc'd object, we also have to free the session when we're done with it.

因为这个会话一个malloc对象所以我们使用必须释放

These three keywords are to the stack segment just as "malloc" and "dealloc" are to the heap segment . . . unnecessary.

三个关键mallocdealloc……多余

You add the stack_depth: 3 parameter to limit the stack trace collected when a malloc is called.

添加stack_depth:3参数限制调用malloc收集跟踪

Since a single heap is actually divided into many heaps (up to 32), unnecessary enabling of malloc multiheap can cause severe fragmentation.

因为单一实际上分割许多最多32),不必要地启用mallocmultiheap导致严重碎片化

Watson malloc: This new malloc subysystem handles small requests more quickly over the default implementation of memory fragmentation.

Watsonmalloc内存碎片缺省实现相比这种malloc子系统能够快速处理一些请求

Pool allocation creates for each thread its own malloc pool which avoids lock contention with other threads.

poolallocation每个线程创建自己malloc避免其他线程发生争用

Restartability without processes requires that we are able to release all malloc'ed memory.

没有进程需求我们能够释放所有分配内存

What if the process was in the middle of allocating additional memory on its heap using malloc, and you call malloc from the signal handler?

如果当进程正在使用malloc分配额外内存通过信号处理器调用malloc怎样

Invoke this script-passing process ID of the process for which you wish to trace malloc calls.

调用这个脚本传递希望跟踪malloc调用进程进程ID

Sometimes application programs may depend unknowingly on the side effects of the malloc 3. 1 allocation policy.

有时候应用程序可能不知不觉地依赖malloc3.1分配策略副作用

In Init stage, it should parse the media and by this load engine's program to start engine, and malloc share memory.

初始根据媒体解析加载启动视频引擎实现握手同时分配系统共享内存空间

The following diagram illustrates the usage of a memory buffer allocated via a call to malloc.

说明通过调用malloc函数使用一段内存缓存

Pool interface -- A vanilla interface that works as a malloc alternative.

接口——替代malloc进行工作普通接口

The following Probe script uses the User Function Entry probe to track malloc routines and display the size of allocation.

下面探测脚本使用用户函数进入探测跟踪malloc例程显示分配内存

Malloc buckets is an extension to the Yorktown allocation policy.

mallocbucketsYorktown分配策略扩展

They do, however, depend on low-level allocators like malloc and free to actually allocate and release their memory.

不过它们依赖mallocfree低层分配程序实际分配释放它们内存

This provides a second option within malloc for satisfying a memory request.

malloc满足一个内存请求提供第二选择

A paper describing Doug Lea's Malloc implementation is available in the Resources section later in this article.

本文后面参考资料部分描述DougLeaMalloc实现文章

The allocator then looks for an object in the free pool before calling malloc.

然后分配器调用malloc之前在此释放查找对象

When an application requires a large number of small allocation requests, malloc buckets is more commonly used.

应用程序许多分配请求经常使用mallocbuckets

By default, the malloc subsystem treats the entire process heap as a single entity.

默认情况malloc子系统整个进程当作单一实体

The example can be used with any C application that uses malloc and free routines to allocate and free the process memory.

这个示例可以应用任何使用mallocfree例程分配释放进程内存C应用程序

This makes the environment variable USE_ZEND_ALLOC available to allow selection of malloc or emalloc memory allocations at runtime.

使环境变量USE_ZEND_ALLOC用于允许运行时选择mallocemalloc内存分配

The answer may surprise you -- allocation in modern JVMs is far faster than the best performing malloc implementations.

答案可能令人惊讶——现代JVM分配执行最好malloc实现

A new M_ZERO flag for malloc allows for memory allocation and zeroing in a single operation.

面向mallocM_ZERO标记允许单个操作完成内存分配调零

A good practice is to always use memset along with malloc, or always use calloc.

良好实践始终结合使用memsetmalloc或者使用calloc

Among other areas, let's discuss page space scrubbing, dynamic xmalloc, memory affinity, and Watson malloc.

有关其他方面我们介绍一下页面空间清理动态xmalloc内存关联Watsonmalloc

In the malloc. d script, the $target will be replaced by the process ID of the application myapp at runtime.

malloc.d脚本运行时$target替换应用程序myapp进程ID

Thus, unless you are writing legacy-compatible code, the use of the MALLOC and FREE macros is discouraged.

因此除非正在遗留兼容代码MALLOCFREE使用提倡

malloc: This allocates a given number of bytes and returns a pointer to them.

malloc函数分配给定字节返回一个指向它们指针

Calls to malloc and free and the C++ operators new and delete result in run-time manipulation of the heap.

调用mallocfree、C++操作newdelete运行进行操作

Because of the frequency of malloc and free memory, it should adopt memory-pool method to avoid memory fragments.

数据内存管理由于涉及到频繁申请释放需要采用内存方式从而避免内存碎片产生

This is probably because actual programs that rely heavily on malloc increasingly tend to use a larger variety of chunk sizes.

可能因为严重依赖malloc实际程序趋向使用大量不同大小

The malloc routine from the pool interface returns a void*.

pool接口malloc例程返回void*。

The malloc routine doesn't call the constructor, but construct does.

malloc例程调用构造函数但是construct调用构造函数