background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Java Core July: Память в Java. Лекция #4 (Часть 2)"

input logo icon
Video tags
|

Video tags

лекция
ссылки
Java (Programming Language)
heap
stack
JMM
урок
Metaspace
Java (Software)
reference
хип
memory
java
PermGen
память
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:03
Where is it stored now, I wrote several
00:00:06
tests, but
00:00:08
they are not yet shared with you, they
00:00:11
will be
00:00:13
shared next time Well,
00:00:19
I will tell you the material now if I just have a local
00:00:22
variable and X is 12 and it is of a primitive
00:00:25
type, this means that there is a piece of memory in the stack
00:00:28
where it is written
00:00:32
12 if I have a reference type, for example, an
00:00:36
array of ixo masinto 12 is written there,
00:00:41
then I have a link to
00:00:44
some memory where it is written
00:00:51
12, from this it turns out yes to those
00:00:57
etofrmurova
00:00:58
vopros if I write and X ra 0 and y ra
00:01:06
1, then it is possible with a huge degree of
00:01:08
certainty according to the specification
00:01:10
of this, nothing is said, but any
00:01:13
normal 0 and 1 will lie next to each other in the
00:01:15
memory, it will most likely be adjacent
00:01:18
cells in the stack, then 4 bytes and the next 4
00:01:21
bytes are
00:01:23
0.1 if
00:01:32
well, I will make them into
00:01:40
arrays, that is more likely
00:01:45
Well, here it is no longer a fact that they will
00:01:49
lie
00:01:50
next to each other, most likely under the memory system,
00:01:53
if you select the arrays twice by contract,
00:01:55
select them next to each other, but it is not a fact, that is, it is not
00:01:58
possible. Oh, the links refer to
00:02:01
completely different completely different
00:02:03
places 0 is written in the pad,
00:02:08
but here, where, under the memory system,
00:02:11
select a new
00:02:15
array. Yes, what does this mean?
00:02:18
It affects when
00:02:21
high-performance
00:02:23
systems are designed, which is rare on Java, but in general, the
00:02:30
processor may have
00:02:32
some memory on my laptop, there is 8 GB,
00:02:36
but the processor and memory are two. different
00:02:37
microchips go from the processor to the
00:02:39
memory, there are somewhere around 200 clock cycles,
00:02:41
the processor, that is, my 2 GHz
00:02:44
drops sharply to 10 ml goes to the memory That is why the
00:02:47
processor has its
00:02:49
own small memory, it is called that there are
00:02:51
several kshey of the order of
00:02:54
256 directly on the processor part the transistor
00:02:57
will appear in memory, that's how it
00:03:00
went into memory. Read me
00:03:02
such and such a subsystem, which even
00:03:05
for the most part, things don't control.
00:03:16
when I go the second
00:03:22
time, if I have
00:03:28
an array of ra 0
00:03:32
2, then if I independently allocate And if I
00:03:35
use
00:03:37
x and then use the game, then it
00:03:40
may turn out that each time it costs
00:03:42
200 cycles
00:03:45
[applause] of
00:03:47
the processor if I write z0 ra Z1 ra, then
00:03:53
rather everything is it costs 200 clocks,
00:03:55
but it costs about
00:03:57
a clock so that the memory is stored in one place,
00:04:01
so when the processor went down
00:04:03
for a long time for the first time, it immediately grabbed a whole
00:04:06
portion of memory from there, and when I
00:04:08
go to cells that are standing next to each other, it
00:04:09
happens very
00:04:13
quickly, in principle, this is not
00:04:16
particularly important for the jarists First of all, we don't write
00:04:18
programs that generate millions of numbers per
00:04:19
second.
00:04:33
most likely they are located
00:04:36
sequentially, again in Java We
00:04:39
can't find this out in any way We can't in
00:04:41
the heat it is not said that the stack should be
00:04:42
continuous memory in the stack it is not said that
00:04:45
arrays are continuous memory but in any
00:04:47
normal implementation they make it so that it
00:04:50
finds
00:04:53
256,573
00:04:54
cells very quickly there is the address of the beginning of the array, they take in
00:04:57
the array that long long long 8 bytes multiply the
00:05:01
index by 8 bytes and get
00:05:04
an offset, however, in some
00:05:07
Android where the memory can be arranged
00:05:08
strangely, they will say that you have such a large
00:05:10
array, we cannot store it in one piece,
00:05:12
Mikrolinus It burns. I only
00:05:14
measure it by megabytes. And it may turn out that
00:05:17
in the end the array was cut into pieces,
00:05:18
but I’m not going to
00:05:22
kill it if I have an
00:05:25
object. Arrays and objects are literally
00:05:28
one and the same from the point of view of the location
00:05:30
in
00:05:33
[music]
00:05:34
memory. Well, let’s do it right away
00:05:42
let's look at the tests Now I wrote the
00:05:46
test today just from
00:05:53
memory if I have a
00:05:56
class h It will have X AND
00:06:02
Y I'll write h h =
00:06:06
h
00:06:11
0
00:06:18
usually give a class that
00:06:21
simply stores some data pointlessly called a
00:06:26
holder, in this case when I
00:06:30
declare Vot Yes, I declare a variable. I
00:06:33
declare something outside the scope of the method. This is not a
00:06:36
local variable. This is an object field. In
00:06:38
this case, it is initialized with zero.
00:06:41
Here it is possible to read and there will be
00:06:43
zero for numbers and zeros for references. Well,
00:06:48
for a boolean,
00:06:58
fse
00:07:03
is a
00:07:07
class, and now I am writing here. что
00:07:13
лр Хранитель ревен New Folder
00:07:17
01 вызваем
00:07:22
это
00:07:26
H
00:07:28
со
00:07:58
какой здесь будет ответ что напечает для компании
00:08:02
Please
00:08:04
don't
00:08:05
answer to create an intrigue sufficiently
00:08:25
[music] it's
00:08:28
complicated
00:08:40
object fields and array elements from the point
00:08:43
of view of placement in memory it's absolutely
00:08:45
one and the
00:08:47
same, that is, the difference is at the level of
00:08:49
language syntax, the elements of the array
00:08:52
must all be of the same type, I can't
00:08:54
say such an array where even is a
00:08:56
fleet And odd is strings
00:09:04
again
00:09:06
and here But I can't say, I want 500,000
00:09:11
fields, not all fields are individual Give everyone
00:09:15
a name, and from the point of view of memory it's
00:09:18
absolutely the same thing and the same
00:09:23
thing, look at me, H appears in me,
00:09:30
which
00:09:32
refers to the memory area
00:09:36
where the holder is somehow placed, an
00:09:39
instance
00:09:40
of holder since
00:09:43
ints are primitive types, they are
00:09:48
stored right
00:09:50
here, that is, here. It will be written that
00:09:53
0 and
00:09:54
1 when I call the
00:09:58
method I will order.
00:10:17
The same
00:10:21
object, I went through it and wrote 100 in Y.
00:10:25
I went through it and wrote 100 in Y,
00:10:31
and then I saved old in my local variable.
00:11:01
by serenky
00:11:04
Well, the value New holdolder -1 -2
00:11:07
is assigned but never
00:11:14
used in this case, that is,
00:11:16
some things seem to be more
00:11:18
sensitive than the language, a
00:11:21
number of things the compiler itself prohibits,
00:11:24
for example, if I do tn and
00:11:27
then it is equal to
00:11:32
it says that it will
00:11:35
never be completed, there is nothing
00:11:37
wrong and it is equal to
00:11:39
11 But this after the return means we will
00:11:42
definitely not get there and the compiler tells me
00:11:45
no, well, this is obvious stupidity, he is obliged to
00:11:48
prevent me from compiling it,
00:11:50
because somehow it is quite obvious that I
00:11:55
made a mistake. But
00:11:57
here I did not violate the specification of the language, I did
00:12:02
not do anything that is prohibited in the pdf,
00:12:05
however, mine is a
00:12:07
little bit more attentive, she
00:12:09
enlightened me, she highlighted this one,
00:12:12
she says it is not mandatory, this last
00:12:14
expression is all you leave the
00:12:16
method, so the language of this does not prohibit
00:12:20
doing it, but it advises that maybe you have
00:12:22
a mistake, that is, maybe you would have a
00:12:23
different logic, because it is so, everything is
00:12:25
so obvious, I will do it, and here the language
00:12:29
allows it, but it says Well, maybe you were
00:12:32
mistaken, for some reason you assign a value to a local argument to a
00:12:36
local variable
00:12:37
that you yourself never
00:12:39
use,
00:12:41
but it's not considered an error because
00:12:43
why it's not considered an error from the point of
00:12:45
view of language syntax, they said, what
00:12:47
if you do something in the constructor,
00:12:49
for example, create a
00:12:50
file, then of course the assignment can also be
00:12:53
an error.
00:12:59
you didn't save it anywhere
00:13:01
But suddenly you're in the constructor, that's what
00:13:03
he has, how do you create files,
00:13:05
send emails, there's something on the screen,
00:13:08
so we don't know what's there, we do
00:13:09
n't consider it a
00:13:11
mistake, they say, well, you're an
00:13:14
argon, Nika no more
00:13:16
you'll use the SES, I'll do it. Here's how
00:13:19
we'll look. Well, twice and twice,
00:13:22
probably
00:13:23
an error if we run it. It will be written
00:13:27
01
00:13:32
next. Now I will build different wonderful
00:13:34
interesting
00:13:38
constructions. it will
00:15:25
be pushed
00:15:54
and the question will be
00:15:57
printed.

Description:

Курс " Программирование на Java с нуля " - 24% https://www.udemy.com/programmirovanie-na-java-c-nula/?couponCode=YOUTUBE-LINK-UNDER-VIDEO Автор курса: Иван Головач

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Java Core July: Память в Java. Лекция #4 (Часть 2)" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Java Core July: Память в Java. Лекция #4 (Часть 2)" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Java Core July: Память в Java. Лекция #4 (Часть 2)" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Java Core July: Память в Java. Лекция #4 (Часть 2)" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Java Core July: Память в Java. Лекция #4 (Часть 2)"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Java Core July: Память в Java. Лекция #4 (Часть 2)"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.