Back in the RetrieveFromPool code, if an entry is not found in the queue, a new object is allocated via the AllocateObject method, as long as fewer than the maximum number of objects is available.
重新观察一下RetrieveFromPool代码,如果在队列中找不到项,则会通过AllocateObject方法分配一个新对象,前提是可用对象的数量低于最大数量。
Resources are only allocated from the data sources, and not at arbitrary places in the code.
这样就可以只在数据源中分配资源,而不是在代码中的任意地方。
AIX does not store information about which code path allocated a particular chunk of memory by default, so this information is not easy to get.
AIX未存储关于哪些代码路径默认分配了特定内存块的信息,但这些信息很容易获得。
Frequently, code in error paths is not well tested and does not clean up all objects, such as locks or allocated memory.
通常错误路径中的程序码不会被详细地测试,而且不会清除所有的物件,例如锁定或已配置的记忆体。
Frequently, code in error paths is not well tested and does not clean up all objects, such as locks or allocated memory.
通常错误路径中的程序码不会被详细地测试,而且不会清除所有的物件,例如锁定或已配置的记忆体。
应用推荐