- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
class MyBigClass
{
var $allocatedSize;
var $allMyOtherStuff;
}
function AllocateMyBigClass()
{
$before = memory_get_usage();
$ret = new MyBigClass;
$after = memory_get_usage();
$ret->allocatedSize = ($after - $before);
return $ret;
}
MyBigClass * AllocateMyBigClass() {
# MyBigClass ret;
MyBigClass * ret = malloc(sizeof(MyBigClass));
# ret.allocatedSize = sizeof(MyBigClass);
ret->allocatedSize = sizeof(MyBigClass);
Для заданий в рамках специальной олимпиады
И чего это он должен ко мне пиздовать?
да!