CVS update: php31/ext/standard
| From: | zeev | Date: | Fri, 21 Aug 1998 00:15:28 +0000 |
| Subject: | CVS update: php31/ext/standard | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-376@lists.php.net to get a copy of this message | ||
Date: Thursday August 20, 1998 @ 20:15
Author: zeev
Update of /repository/php31/ext/standard
In directory asf:/tmp/cvs-serv18215/ext/standard
Modified Files:
basic_functions.c basic_functions.h
Log Message:
Add memory_status(), may be useful in debugging and performance tuning
Start a ChangeLog, we might as well do it now...
Index: php31/ext/standard/basic_functions.c
diff -c php31/ext/standard/basic_functions.c:2.5 php31/ext/standard/basic_functions.c:2.6
*** php31/ext/standard/basic_functions.c:2.5 Thu Aug 20 08:50:12 1998
--- php31/ext/standard/basic_functions.c Thu Aug 20 20:15:27 1998
***************
*** 265,270 ****
--- 265,271 ----
{"call_user_method", php3_call_user_method, NULL},
PHP3_FE(register_shutdown_function, NULL)
+ PHP3_FE(memory_status, NULL)
{NULL, NULL, NULL}
};
***************
*** 1537,1543 ****
{
pval *arg, shutdown_function_name;
! if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &arg)) {
WRONG_PARAM_COUNT;
}
--- 1538,1544 ----
{
pval *arg, shutdown_function_name;
! if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &arg)==FAILURE) {
WRONG_PARAM_COUNT;
}
***************
*** 1552,1557 ****
--- 1553,1585 ----
_php3_hash_next_index_insert(user_shutdown_function_names, &shutdown_function_name,
sizeof(pval), NULL);
}
+
+ PHP3_FUNCTION(memory_status)
+ {
+ pval *verbose_arg;
+ unsigned char verbose;
+
+ switch(ARG_COUNT(ht)) {
+ case 0:
+ verbose = 0;
+ break;
+ case 1:
+ if (getParameters(ht, 1, &verbose_arg)==FAILURE) {
+ RETURN_FALSE;
+ }
+ convert_to_long(verbose_arg);
+ verbose = (unsigned char) verbose_arg->value.lval;
+ break;
+ default:
+ WRONG_PARAM_COUNT;
+ break;
+ }
+ if (!php3_header()) {
+ return;
+ }
+ memory_manager_status(verbose);
+ RETURN_TRUE;
+ }
/*
* Local variables:
Index: php31/ext/standard/basic_functions.h
diff -c php31/ext/standard/basic_functions.h:2.2 php31/ext/standard/basic_functions.h:2.3
*** php31/ext/standard/basic_functions.h:2.2 Thu Aug 20 08:50:12 1998
--- php31/ext/standard/basic_functions.h Thu Aug 20 20:15:27 1998
***************
*** 29,35 ****
*/
! /* $Id: basic_functions.h,v 2.2 1998/08/20 12:50:12 rasmus Exp $ */
#ifndef _BASIC_FUNCTIONS_H
#define _BASIC_FUNCTIONS_H
--- 29,35 ----
*/
! /* $Id: basic_functions.h,v 2.3 1998/08/21 00:15:27 zeev Exp $ */
#ifndef _BASIC_FUNCTIONS_H
#define _BASIC_FUNCTIONS_H
***************
*** 92,97 ****
--- 92,98 ----
extern void php3_error_log(INTERNAL_FUNCTION_PARAMETERS);
PHP3_FUNCTION(register_shutdown_function);
+ PHP3_FUNCTION(memory_status);
#if HAVE_PUTENV
typedef struct {
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net