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

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

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

VuGen has a limitation of 64K for local variables. If you want to declare a variable larger than 64K:

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

1 char buffer[100000];
2  
3 Actions()
4  
5 {
6  
7 return 0;
8  
9 }

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

1 Actions()
2  
3 {
4  
5 char *buffer = (char *) malloc(100000);
6  
7 /*Remember to free it when you do not need it*/
8  
9 free(buffer);
10  
11 return 0;
12  
13 }

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

 

转:Loadrunner报错“Too many local variablesAction.c”解决方法的更多相关文章

  1. Loadrunner报错“Too many local variablesAction.c”解决方法

    问题描述,在Action.c里定义数组时如果数组长度过长,如char a[1024*1024]运行时即会报错: 意思为:太多的局部变量 问题原因及解决方法如下: 1. VuGen对于局部变量可以分配的 ...

  2. 安装PHP过程中,make步骤报错:(集合网络上各种解决方法)

    安装PHP过程中,make步骤报错:(集合网络上各种解决方法) (1)-liconv -o sapi/fpm/php-fpm /usr/bin/ld: cannot find -liconv coll ...

  3. shell报错:-bash: [: ==: 期待一元表达式 解决方法 ([: ==: unary operator expected)

    shell报错:-bash: [: ==: 期待一元表达式 解决方法 ([: ==: unary operator expected) blogdaren 2015-02-26  抢沙发 14916人 ...

  4. linux下svn客户端报错Cannot negotiate authentication mechanism的解决方法

    svn客户端报错Cannot negotiate authentication mechanism的解决方法: 问题出现的原因之一: 因为SVN服务器配置了saslauthd服务用来实现与ldap的对 ...

  5. 关于163发邮件报错535 Error:authentication failed解决方法

    关于发邮件报错535 Error:authentication failed解决方法 调用163邮箱服务器来发送邮件,我们需要开启POP3/SMTP服务,这时163邮件会让我们设置客户端授权码,这个授 ...

  6. zabbix监控报错zabbix server is not running解决方法

    问题描述: 布置好zabbix监控,正常运行.但是重启了虚拟机服务器之后,页面出现如下的报错,而且设置的报信息也是失效的:

  7. python安装locustio报错error: invalid command 'bdist_wheel'的解决方法

    locust--scalable user load testing tool writen in Python(是用python写的.规模化.可扩展的测试性能的工具) 安装locustio需要的环境 ...

  8. Linux服务器init 5启动图形界面,报错Retrigger failed udev events的解决方法

    1.开启linux系统的桌面环境,使用startx未成功,报如下错误: 提示:Retrigger failed udev events [root@ /]# startx xauth: creatin ...

  9. IIS报错:Exception from HRESULT: 0x8007000B解决方法

    报错如下: System.Web.Services.dll 中发生,但未在用户代码中进行处理 其他信息: 服务器无法处理请求. ---> 尝试加载 Oracle 客户端库时引发 BadImage ...

随机推荐

  1. 【Python之路】第一篇--Linux基础命令

    pwd 命令 查看”当前工作目录“的完整路径 pwd -P # 显示出实际路径,而非使用连接(link)路径:pwd显示的是连接路径 .   表示当前目录 ..  表示上级目录 /  表示根目录 ls ...

  2. MyBatis 批量修改记录

    <insert id="update" parameterType="java.util.List"> UPDATE setting SET con ...

  3. POJ 1966 ZOJ 2182 Cable TV Network

    无向图顶点连通度的求解,即最少删除多少个点使无向图不连通. 我校“荣誉”出品的<图论算法理论.实现及其应用>这本书上写的有错误,请不要看了,正确的是这样的: 对于每个顶点,分成两个点,v和 ...

  4. js 放置 cookie、获取 cookie、删除 cookie

    这块TM的删不掉 代码如下: // 自定义 js cookies var mycookie = { // 放置 set : function(name,value){ var Days = 1; // ...

  5. R语言笔记2--循环、R脚本

    1.循环语句 for语句 while语句 2.R脚本 source()函数 print()函数

  6. apache: 503

    Any connection over Max, will get a 503 Service Temporarily Unavailable. 503出现的场景:压测url时,发现大量的503错误. ...

  7. virtualenv 管理python 环境

    virualenvvirtualenv用于创建独立的Python环境,多个Python相互独立,互不影响,它能够:1. 在没有权限的情况下安装新套件2. 不同应用可以使用不同的套件版本3. 套件升级不 ...

  8. ul li排版 左右对齐

    定义两个ul的class, 一个向左浮动, 一个向右浮动 #navtop{      width:100%;      height:46px;      background-color:#ecf0 ...

  9. 纯CSS做的一个Silder

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  10. mongodb 慢SQL查询

    在 MySQL中,慢查询日志是经常作为我们优化数据库的依据,那在MongoDB中是否有类似的功能呢?答案是肯定的,那就是Mongo Database Profiler.不仅有,而且还有一些比MySQL ...