问题描述,在Action.c里定义数组时如果数组长度过长,如char a[1024*1024]运行时即会报错

意思为:太多的局部变量

问题原因及解决方法如下:

1. VuGen对于局部变量可以分配的最大内存为64K,如果想分配空间大于64K的变量的话,需要通过如下方法:

a. 将其定义为全局变量,Declare it globally.

char buffer[100000]; 

Actions() 

{ 

return 0; 

}

b. 使用malloc()来分配内存,Use malloc() to allocate the memory.

Actions() 

{ 

char *buffer = (char *) malloc(100000); 

/*Remember to free it when you do not need it*/ 

free(buffer); 

return 0; 

}

2. 如果在录制脚本后进行回放时报错,可以按照下面步骤进行配置:

If you have this problem replaying a large database script in LoadRunner 7.8 or above, immediately after recording.

a. Go to Tools -> Regenerate Vusers...

b. Click on 'Options...' to edit the recording options

c. Under General:

1. Script section, enable the option for "Split action section to functions by event".By default, this is not enabled and it has a value of "500". This option is useful for when the action section is rather large

2. Script and select "Maximum number of lines in action file", change the value to 30000 and regenerate again

问题:运行脚本报“Too many local variablese”的错误

解决方法:

脚本拆分录制

这个错误是说明ACTION里代码的变量个数超出了它规定的范围.一般好像不能超过50个.

最新文章

  1. Python 3.5源码编译安装
  2. node(Buffer缓存区)
  3. 2016-2017-2 《Java程序设计》课程学生博客和代码托管链接
  4. showModalDialog 的重要提示
  5. 自学H5第二天
  6. JZOJ P1847:找01串
  7. hdu.5212.Code(莫比乌斯反演 && 埃氏筛)
  8. 元素设置position:fixed属性后IE下宽度无法100%延伸
  9. Q3: Linked List Cycle II
  10. spring3+struts2+hibernate3整合出现的问题,No mapping found for dependency [type=java.lang.String, name='struts.objectFactory.spring.enableAopSupport']
  11. javascript和jquery 获取触发事件的元素
  12. TProcedure,TMethod,TNotifyEvent,TWndMethod的区别,并模拟点击按钮后发生的动作
  13. PC远程调试移动设备(转载)
  14. 南京邮电大学java程序设计作业在线编程第三次作业
  15. Django 之缓存
  16. Linux下输出 excel文件
  17. DELPHI微信支付代码
  18. c++字符串split 函数实现
  19. Controller向View传值方式总结
  20. 团队Alpha冲刺(四)

热门文章

  1. windows使用composer.phar
  2. jbpm3.2创建数据库
  3. OpenCV---模板匹配matchTemplate
  4. 部署维护docker环境
  5. a 标签传值
  6. 七牛云 PHP SDK服务器鉴权失败!参数解释
  7. canvas h5制作写字板
  8. HDU 2067 小兔的棋盘 (模拟)
  9. sublime格式化css代码插件:css format
  10. 43、os和sys模块的作用?