草庐IT

Menu_Memory

全部标签

c++ - Rcpp Armadillo : Issue with memory usage

我已经开始使用Rcpp。我很喜欢。我对编程相当陌生。我有一个关于内存使用的问题。下面是一个可重现的问题:library(RcppArmadillo)library(inline)code我的理解是,在上面的问题中,唯一的内存使用是当我将数组分配给变量时。输入在R.所以我应该只使用大约1.6gb(2*2*50*8=1600)。当我去Rcpp时,我初始化了变量输入_使用作为指针的SEXP对象。所以这不应该使用任何额外的内存。然后当我初始化变量打扰,我也使用一个指针并设置copy_aux=FALSE。所以我不应该使用任何内存。因此,如果我的理解是正确的,那么我在运行代码时应该只使用1.6GB

c++ - std::memory_order_seq_cst 是如何工作的

我从以下位置获取了有关std::memory_order_seq_cst的示例:http://en.cppreference.com/w/cpp/atomic/memory_order#include#include#includestd::atomicx={false};std::atomicy={false};std::atomicz={0};voidwrite_x(){x.store(true,std::memory_order_seq_cst);}voidwrite_y(){y.store(true,std::memory_order_seq_cst);}voidread_x_

c++ - 内存泄漏 : unable to break on a memory allocation number

我正在尝试找出内存泄漏问题。我的项目是一个基于ATL的对话框项目,它使用DirectShow和标准库。我的程序中总共有45个内存泄漏,每个都是24个字节。我在我的stdafx.h中#define'd_CRTDBG_MAP_ALLOC等,以及DEBUG_NEW以获取每个内存泄漏的文件和行号。但是,没有打印文件行号。内存块都是“普通”block,看起来像这样:{180}normalblockat0x003E6008,24byteslong.Data:_>>W>A0AE3E00B05F3E00A0AE3E0057000000我尝试将以下行添加到_tWinMain()的开头_CrtSetBre

iOS 开发 : How am I mismanaging memory in this code?

我刚刚添加了一些取自Appledocs的代码它显示了如何使用从Nib创建的自定义UITableViewCells。我是iOS开发的新手,所以我仍在学习适当的内存管理,而且代码对我来说并不是一开始就很清楚它是如何工作的。当我运行Allocations工具时,它会在下面的代码中显示未分配的内存。具体来说,它显示在ViewController从导航堆栈弹出后UITableViewCells保持事件状态...-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexP

ios - RESideMenu : Side menu for iOS 7 to support both left and right menu

我正在使用RESideMenu实现具有视差效果的iOS7样式侧边菜单,但我遇到了一种情况,我需要为右侧和左侧实现侧边菜单,就像旧的FacebookiOS应用程序一样,右侧菜单用于friend列表,左侧导航菜单。 最佳答案 我一直在尝试为正确的项目菜单做,它通过编辑RESideMenu.m中的值来工作:if(!_contentViewInLandscapeOffsetCenterX)_contentViewInLandscapeOffsetCenterX=CGRectGetHeight(self.view.frame)+30.f;if

ios - presentOpenInMenuFromBarButtonItem : doesn't cause menu to appear

我正在尝试通过UIDocumentInteractionController和presentOpenInMenuFromBarButtonItem显示“打开方式”菜单。这不会在屏幕上显示UIDocumentInteractionController。奇怪的是,如果我将“OpenIn”替换为“Options”,那么它将按预期工作。是什么导致presentOpenInMenuFromBarButtonItem不起作用?谢谢。NSString*fileName=[NSStringstringWithFormat:@"%@text.txt",NSTemporaryDirectory()];[s

iOS-Slide-Menu 菜单在未设置为应用程序根 Controller 时不起作用

当应用程序启动时我有一个“正在加载”的RootViewController,它将确定加载滑动菜单Controller或另一个Controller,菜单不起作用。它是可见的,并且动画效果很好,只有所有触摸都被禁用。我已经将我的设置提炼为:在应用委托(delegate)中self.window.rootViewController=[[TestViewControlleralloc]init];然后在testViewControllerviewDidAppear中:SlideNavigationController*slideNavigationController=[[SlideNavi

ios - 我在哪里可以找到 Mac 上的 Memory Monitor Instrument?

我很难调试在GPU密集型应用程序上崩溃的内存。这个答案谈到了内存监视器仪器:https://stackoverflow.com/a/10951144/1167349Apple的这个文档页面也是如此:https://developer.apple.com/library/ios/documentation/AnalysisTools/Reference/Instruments_User_Reference/MemoryMonitorInstrument/MemoryMonitorInstrument.html但是,当我打开Instruments时,没有内存监视器可供选择:(是的,我也用了

ios - Q :Get rows count by indexPath of tableView comes `Trying to put the stack in unreadable memory at:` error

在我的tableView委托(delegate)方法中:我在tableViewdelegate方法中得到了numberOfRows和numberOfSections:-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath和-(CGFloat)tableView:(UITableView*)tableViewheightForRowAtIndexPath:(NSIndexPath*)indexPath,但是在-(NSInteger)tableView

ios - didReceiveMemoryWarning : what type of memory?

我有一个基本的cordova应用程序,其中包含一些围绕cordova框架的objective-c代码。有时我有didReceiveMemoryWarning通知,但我不明白问题是UIWebView内的javascript还是其他。文档说:Yourappnevercallsthismethoddirectly.Instead,thismethodiscalledwhenthesystemdeterminesthattheamountofavailablememoryislow.但我的问题是:什么类型的内存?内存?堆分配?还有别的吗? 最佳答案